summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/dhclient
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2006-08-17 17:12:27 +0000
committerbrian <brian@FreeBSD.org>2006-08-17 17:12:27 +0000
commita3922ffaf600bcd06d7363d5e87ff9289859ce65 (patch)
treef87350c5fc4681fa51e1fc97c0a3407d6bd3efc2 /etc/rc.d/dhclient
parent8dcb0483a6e8eff67cf2fb1309ec730ae1f05773 (diff)
downloadFreeBSD-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/rc.d/dhclient')
-rwxr-xr-xetc/rc.d/dhclient13
1 files changed, 12 insertions, 1 deletions
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
OpenPOWER on IntegriCloud