include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=base-files-network
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=base-files-network
PKG_BUILD_DEPENDS:=opkg/host
PKG_BUILD_DEPENDS:=opkg/host
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
dhcp)
# kill running udhcpc instance
local pidfile="/var/run/dhcp-${iface}.pid"
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
local ipaddr netmask hostname proto1 clientid vendorid broadcast reqopts
config_get ipaddr "$config" ipaddr
[ "$proto1" != "$proto" ] && append dhcpopts "-n -q" || append dhcpopts "-O rootpath -R &"
[ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
[ "$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} \
${ipaddr:+-r $ipaddr} \
${hostname:+-H $hostname} \
${clientid:+-c $clientid} \
- 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"
}
uci -P /var/state revert "network.$config"
}