mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 18:23:09 +02:00
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
This commit is contained in:
parent
f68235d274
commit
16913a975c
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files-network
|
PKG_NAME:=base-files-network
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=opkg/host
|
PKG_BUILD_DEPENDS:=opkg/host
|
||||||
|
|
||||||
|
@ -370,7 +370,7 @@ setup_interface() {
|
|||||||
local pidfile="/var/run/dhcp-${iface}.pid"
|
local pidfile="/var/run/dhcp-${iface}.pid"
|
||||||
|
|
||||||
SERVICE_PID_FILE="$pidfile" \
|
SERVICE_PID_FILE="$pidfile" \
|
||||||
service_stop udhcpc
|
service_stop /sbin/udhcpc
|
||||||
|
|
||||||
local ipaddr netmask hostname proto1 clientid vendorid broadcast reqopts
|
local ipaddr netmask hostname proto1 clientid vendorid broadcast reqopts
|
||||||
config_get ipaddr "$config" ipaddr
|
config_get ipaddr "$config" ipaddr
|
||||||
@ -386,15 +386,21 @@ setup_interface() {
|
|||||||
$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
|
$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
|
||||||
|
|
||||||
# additional request options
|
# additional request options
|
||||||
local opt dhcpopts
|
local opt dhcpopts daemonize
|
||||||
for opt in $reqopts; do
|
for opt in $reqopts; do
|
||||||
append dhcpopts "-O $opt"
|
append dhcpopts "-O $opt"
|
||||||
done
|
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)
|
||||||
[ "$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=
|
[ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
|
||||||
|
|
||||||
|
SERVICE_DAEMONIZE=$daemonize \
|
||||||
SERVICE_PID_FILE="$pidfile" \
|
SERVICE_PID_FILE="$pidfile" \
|
||||||
service_start /sbin/udhcpc -t 0 -i "$iface" \
|
service_start /sbin/udhcpc -t 0 -i "$iface" \
|
||||||
${ipaddr:+-r $ipaddr} \
|
${ipaddr:+-r $ipaddr} \
|
||||||
|
Loading…
Reference in New Issue
Block a user