diff options
author | brian <brian@FreeBSD.org> | 2006-08-17 17:12:27 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2006-08-17 17:12:27 +0000 |
commit | a3922ffaf600bcd06d7363d5e87ff9289859ce65 (patch) | |
tree | f87350c5fc4681fa51e1fc97c0a3407d6bd3efc2 /etc | |
parent | 8dcb0483a6e8eff67cf2fb1309ec730ae1f05773 (diff) | |
download | FreeBSD-src-a3922ffaf600bcd06d7363d5e87ff9289859ce65.zip FreeBSD-src-a3922ffaf600bcd06d7363d5e87ff9289859ce65.tar.gz |
Add a -p switch to dhclient. The switch tells dhclient to persist
despite the interface link status.
Add dhclient_flags_iface and background_dhclient_iface rc.conf options.
(where iface is a specific interface). These can be used to give
interface specific flags to dhclient.
Reviewed by: brooks@
Diffstat (limited to 'etc')
-rw-r--r-- | etc/defaults/rc.conf | 1 | ||||
-rwxr-xr-x | etc/rc.d/dhclient | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index ee14139..3f4e150 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -94,6 +94,7 @@ hostname="" # Set this! nisdomainname="NO" # Set to NIS domain if using NIS (or NO). dhclient_program="/sbin/dhclient" # Path to dhcp client program. dhclient_flags="" # Additional flags to pass to dhcp client. +dhclient_flags_fxp0="" # Additional dhclient flags for fxp0 only background_dhclient="NO" # Start dhcp client in the background. synchronous_dhclient="YES" # Start dhclient directly on configured # interfaces during startup. diff --git a/etc/rc.d/dhclient b/etc/rc.d/dhclient index 4d6d733..8dae28e 100755 --- a/etc/rc.d/dhclient +++ b/etc/rc.d/dhclient @@ -27,7 +27,18 @@ dhclient_start() fi fi - if checkyesno background_dhclient; then + # Override for $ifn specific flags (see rc.subr for $flags setting) + eval specific=\$dhclient_flags_$ifn + if [ -z "$flags" -a -n "$specific" ]; then + rc_flags=$specific + fi + + eval specific=\$background_dhclient_$ifn + if [ -n "$specific ]; then + if checkyesno background_dhclient_$ifn; then + rc_flags="${rc_flags} -b" + fi + elif checkyesno background_dhclient; then rc_flags="${rc_flags} -b" fi |