diff options
author | brooks <brooks@FreeBSD.org> | 2007-03-02 20:48:35 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2007-03-02 20:48:35 +0000 |
commit | 94dde8f6980ad1b1b5a3e9b9c8ff10f43de0f64e (patch) | |
tree | f0670810d82c0c79808cbcc1f42ee12e15c0c3fb /etc/rc.d/dhclient | |
parent | 70309cb244dbccaa13d4fed9e4631c837c84fab0 (diff) | |
download | FreeBSD-src-94dde8f6980ad1b1b5a3e9b9c8ff10f43de0f64e.zip FreeBSD-src-94dde8f6980ad1b1b5a3e9b9c8ff10f43de0f64e.tar.gz |
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
Diffstat (limited to 'etc/rc.d/dhclient')
-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 cc849b8..fb286bd 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 |