mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-03-05 13:16:31 +00:00
package/base-files-network: use new service wrappers
SVN-Revision: 28866
This commit is contained in:
parent
b7b56df707
commit
f4dacc850c
@ -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:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=opkg/host
|
PKG_BUILD_DEPENDS:=opkg/host
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006-2011 OpenWrt.org
|
||||||
|
|
||||||
# DEBUG="echo"
|
# DEBUG="echo"
|
||||||
|
|
||||||
@ -368,7 +368,9 @@ setup_interface() {
|
|||||||
dhcp)
|
dhcp)
|
||||||
# kill running udhcpc instance
|
# kill running udhcpc instance
|
||||||
local pidfile="/var/run/dhcp-${iface}.pid"
|
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
|
local ipaddr netmask hostname proto1 clientid vendorid broadcast reqopts
|
||||||
config_get ipaddr "$config" ipaddr
|
config_get ipaddr "$config" ipaddr
|
||||||
@ -393,7 +395,8 @@ setup_interface() {
|
|||||||
[ "$proto1" != "$proto" ] && append dhcpopts "-n -q" || append dhcpopts "-O rootpath -R &"
|
[ "$proto1" != "$proto" ] && append dhcpopts "-n -q" || append dhcpopts "-O rootpath -R &"
|
||||||
[ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
|
[ "$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} \
|
${ipaddr:+-r $ipaddr} \
|
||||||
${hostname:+-H $hostname} \
|
${hostname:+-H $hostname} \
|
||||||
${clientid:+-c $clientid} \
|
${clientid:+-c $clientid} \
|
||||||
@ -426,8 +429,8 @@ stop_interface_dhcp() {
|
|||||||
|
|
||||||
remove_dns "$config"
|
remove_dns "$config"
|
||||||
|
|
||||||
local pidfile="/var/run/dhcp-${ifname}.pid"
|
SERVICE_PID_FILE="/var/run/dhcp-${ifname}.pid" \
|
||||||
service_kill udhcpc "$pidfile"
|
service_stop /sbin/udhcpc
|
||||||
|
|
||||||
uci -P /var/state revert "network.$config"
|
uci -P /var/state revert "network.$config"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user