projects
/
openwrt
/
staging
/
dedeckeh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
001b935
)
base-files: fix handling of dhcp "reqopts" option
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 29 Jan 2011 13:45:16 +0000
(13:45 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 29 Jan 2011 13:45:16 +0000
(13:45 +0000)
SVN-Revision: 25237
package/base-files/files/lib/network/config.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/lib/network/config.sh
b/package/base-files/files/lib/network/config.sh
index 449d252abdc23bb0ea9dd87ff01373b4f0c9bd8c..b59b1f232659e7b834b2b2a5b0c8091eb1a0cf03 100755
(executable)
--- a/
package/base-files/files/lib/network/config.sh
+++ b/
package/base-files/files/lib/network/config.sh
@@
-360,9
+360,14
@@
setup_interface() {
[ -z "$ipaddr" ] || \
$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
[ -z "$ipaddr" ] || \
$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" ] && dhcpopts="-n -q"
+ [ "$proto1" != "$proto" ] && append dhcpopts "-n -q" || append dhcpopts "-O rootpath -R &"
[ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
$DEBUG eval udhcpc -t 0 -i "$iface" \
[ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
$DEBUG eval udhcpc -t 0 -i "$iface" \
@@
-371,8
+376,7
@@
setup_interface() {
${clientid:+-c $clientid} \
${vendorid:+-V $vendorid} \
-b -p "$pidfile" $broadcast \
${clientid:+-c $clientid} \
${vendorid:+-V $vendorid} \
-b -p "$pidfile" $broadcast \
- ${reqopts:+-O $reqopts} \
- ${dhcpopts:- -O rootpath -R &}
+ ${dhcpopts}
;;
none)
setup_interface_none "$iface" "$config"
;;
none)
setup_interface_none "$iface" "$config"