aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2006-08-17 17:12:27 +0000
committerBrian Somers <brian@FreeBSD.org>2006-08-17 17:12:27 +0000
commit9341e8dd887b66af8f879981f4acb194ff611372 (patch)
treef87350c5fc4681fa51e1fc97c0a3407d6bd3efc2 /etc
parent15af4b716bd4d0494fc01416e3e2300c85c5fa65 (diff)
downloadsrc-9341e8dd887b66af8f879981f4acb194ff611372.tar.gz
src-9341e8dd887b66af8f879981f4acb194ff611372.zip
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@
Notes
Notes: svn path=/head/; revision=161410
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf1
-rwxr-xr-xetc/rc.d/dhclient13
2 files changed, 13 insertions, 1 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index ee141394cc65..3f4e150fc8de 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 4d6d73365ce1..8dae28eee133 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