summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-11 13:23:29 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-11 13:23:29 +0000
commit16913a975c30f095b7c37b57293963894ed963f9 (patch)
tree570d2b481afafe26e283546f65b22447374d1e80 /package
parentf68235d274a60e02a64b3773f38ec9b5d9a2e11f (diff)
package/base-files-network: fix udhcpc issues introduced in r28866 (closes: #10383)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28942 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/base-files-network/Makefile2
-rwxr-xr-xpackage/base-files-network/files/lib/network/config.sh12
2 files changed, 10 insertions, 4 deletions
diff --git a/package/base-files-network/Makefile b/package/base-files-network/Makefile
index ead945809..65ed020ac 100644
--- a/package/base-files-network/Makefile
+++ b/package/base-files-network/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=base-files-network
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_BUILD_DEPENDS:=opkg/host
diff --git a/package/base-files-network/files/lib/network/config.sh b/package/base-files-network/files/lib/network/config.sh
index da45089df..feeaa2f9c 100755
--- a/package/base-files-network/files/lib/network/config.sh
+++ b/package/base-files-network/files/lib/network/config.sh
@@ -370,7 +370,7 @@ setup_interface() {
local pidfile="/var/run/dhcp-${iface}.pid"
SERVICE_PID_FILE="$pidfile" \
- service_stop udhcpc
+ service_stop /sbin/udhcpc
local ipaddr netmask hostname proto1 clientid vendorid broadcast reqopts
config_get ipaddr "$config" ipaddr
@@ -386,15 +386,21 @@ setup_interface() {
$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
# additional request options
- local opt dhcpopts
+ local opt dhcpopts daemonize
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)
- [ "$proto1" != "$proto" ] && append dhcpopts "-n -q" || append dhcpopts "-O rootpath -R &"
+ [ "$proto1" != "$proto" ] && {
+ append dhcpopts "-n -q"
+ } || {
+ append dhcpopts "-O rootpath -R"
+ daemonize=1
+ }
[ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
+ SERVICE_DAEMONIZE=$daemonize \
SERVICE_PID_FILE="$pidfile" \
service_start /sbin/udhcpc -t 0 -i "$iface" \
${ipaddr:+-r $ipaddr} \