mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-26 04:01:05 +02:00
[package] base-files: fix handling of dhcp "reqopts" option
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25237 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
45b3146291
commit
414b1d969f
@ -360,9 +360,14 @@ setup_interface() {
|
|||||||
[ -z "$ipaddr" ] || \
|
[ -z "$ipaddr" ] || \
|
||||||
$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
|
$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
|
||||||
|
|
||||||
|
# additional request options
|
||||||
|
local opt dhcpopts
|
||||||
|
for opt in $reqopts; do
|
||||||
|
append dhcpopts -O "$opt"
|
||||||
|
done
|
||||||
|
|
||||||
# don't stay running in background if dhcp is not the main proto on the interface (e.g. when using pptp)
|
# don't stay running in background if dhcp is not the main proto on the interface (e.g. when using pptp)
|
||||||
local dhcpopts
|
[ "$proto1" != "$proto" ] && append dhcpopts "-n -q" || append dhcpopts "-O rootpath -R &"
|
||||||
[ ."$proto1" != ."$proto" ] && dhcpopts="-n -q"
|
|
||||||
[ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
|
[ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
|
||||||
|
|
||||||
$DEBUG eval udhcpc -t 0 -i "$iface" \
|
$DEBUG eval udhcpc -t 0 -i "$iface" \
|
||||||
@ -371,8 +376,7 @@ setup_interface() {
|
|||||||
${clientid:+-c $clientid} \
|
${clientid:+-c $clientid} \
|
||||||
${vendorid:+-V $vendorid} \
|
${vendorid:+-V $vendorid} \
|
||||||
-b -p "$pidfile" $broadcast \
|
-b -p "$pidfile" $broadcast \
|
||||||
${reqopts:+-O $reqopts} \
|
${dhcpopts}
|
||||||
${dhcpopts:- -O rootpath -R &}
|
|
||||||
;;
|
;;
|
||||||
none)
|
none)
|
||||||
setup_interface_none "$iface" "$config"
|
setup_interface_none "$iface" "$config"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user