diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2007-03-02 20:48:35 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2007-03-02 20:48:35 +0000 |
commit | a9e1dd9098e66e9b6da587ac53ee7444afa1d977 (patch) | |
tree | f0670810d82c0c79808cbcc1f42ee12e15c0c3fb /etc/rc.d | |
parent | b8f6a34f3ebb0d3ffff3ea08f91728b94364025a (diff) | |
download | src-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
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-x | etc/rc.d/dhclient | 10 |
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 |