From a3922ffaf600bcd06d7363d5e87ff9289859ce65 Mon Sep 17 00:00:00 2001 From: brian Date: Thu, 17 Aug 2006 17:12:27 +0000 Subject: 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@ --- etc/rc.d/dhclient | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'etc/rc.d/dhclient') 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 -- cgit v1.1