summaryrefslogtreecommitdiffstats
path: root/package/base-files-network
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-08 22:47:54 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-08 22:47:54 +0000
commite7bca57cf8acd855247b5c83b025ad83a7eba4be (patch)
treeb513e03563cf56c2874a272d79e31692f6035135 /package/base-files-network
parenta12802298d5e41b5f411d9f54e6ab1454569ae5a (diff)
package/base-files-network: use new service wrappers
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28866 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files-network')
-rw-r--r--package/base-files-network/Makefile2
-rwxr-xr-xpackage/base-files-network/files/lib/network/config.sh13
2 files changed, 9 insertions, 6 deletions
diff --git a/package/base-files-network/Makefile b/package/base-files-network/Makefile
index 78c9981e6..ead945809 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:=1
+PKG_RELEASE:=2
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 74810e47d..da45089df 100755
--- a/package/base-files-network/files/lib/network/config.sh
+++ b/package/base-files-network/files/lib/network/config.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
# DEBUG="echo"
@@ -368,7 +368,9 @@ setup_interface() {
dhcp)
# kill running udhcpc instance
local pidfile="/var/run/dhcp-${iface}.pid"
- service_kill udhcpc "$pidfile"
+
+ SERVICE_PID_FILE="$pidfile" \
+ service_stop udhcpc
local ipaddr netmask hostname proto1 clientid vendorid broadcast reqopts
config_get ipaddr "$config" ipaddr
@@ -393,7 +395,8 @@ setup_interface() {
[ "$proto1" != "$proto" ] && append dhcpopts "-n -q" || append dhcpopts "-O rootpath -R &"
[ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
- $DEBUG eval udhcpc -t 0 -i "$iface" \
+ SERVICE_PID_FILE="$pidfile" \
+ service_start /sbin/udhcpc -t 0 -i "$iface" \
${ipaddr:+-r $ipaddr} \
${hostname:+-H $hostname} \
${clientid:+-c $clientid} \
@@ -426,8 +429,8 @@ stop_interface_dhcp() {
remove_dns "$config"
- local pidfile="/var/run/dhcp-${ifname}.pid"
- service_kill udhcpc "$pidfile"
+ SERVICE_PID_FILE="/var/run/dhcp-${ifname}.pid" \
+ service_stop /sbin/udhcpc
uci -P /var/state revert "network.$config"
}