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
This commit is contained in:
parent
b8f6a34f3e
commit
a9e1dd9098
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167181
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user