aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2007-03-02 20:48:35 +0000
committerBrooks Davis <brooks@FreeBSD.org>2007-03-02 20:48:35 +0000
commita9e1dd9098e66e9b6da587ac53ee7444afa1d977 (patch)
treef0670810d82c0c79808cbcc1f42ee12e15c0c3fb
parentb8f6a34f3ebb0d3ffff3ea08f91728b94364025a (diff)
downloadsrc-a9e1dd9098e66e9b6da587ac53ee7444afa1d977.tar.gz
src-a9e1dd9098e66e9b6da587ac53ee7444afa1d977.zip
Use get_if_var() to retrieve interface specific values of dhclient_flags
and background_dhclient. This allows interfaces who's names are not valid parts of shell variables and shortens the code. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=167181
-rwxr-xr-xetc/rc.d/dhclient10
1 files changed, 3 insertions, 7 deletions
diff --git a/etc/rc.d/dhclient b/etc/rc.d/dhclient
index cc849b895130..fb286bd1d9a9 100755
--- a/etc/rc.d/dhclient
+++ b/etc/rc.d/dhclient
@@ -28,17 +28,13 @@ dhclient_start()
fi
# Override for $ifn specific flags (see rc.subr for $flags setting)
- eval specific=\$dhclient_flags_$ifn
+ specific=`get_if_var $ifn dhclient_flags_IF`
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
+ background_dhclient=`get_if_var $ifn background_dhclient_IF $background_dhclient`
+ if checkyesno background_dhclient_$ifn; then
rc_flags="${rc_flags} -b"
fi