summaryrefslogtreecommitdiff
path: root/openwrt/package/base-files/default/sbin/ifup
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2005-07-20 19:58:40 +0000
committerMike Baker <mbm@openwrt.org>2005-07-20 19:58:40 +0000
commit6a4f0e2b5488b191d8d96482717f56984bc2e386 (patch)
treec955985cd7d6588cb3e96865f49181f809cf2b85 /openwrt/package/base-files/default/sbin/ifup
parent5ea9dc5f57a7c9fe3fd6fc891a3e3409986da2de (diff)
downloadmtk-20170518-6a4f0e2b5488b191d8d96482717f56984bc2e386.zip
mtk-20170518-6a4f0e2b5488b191d8d96482717f56984bc2e386.tar.gz
mtk-20170518-6a4f0e2b5488b191d8d96482717f56984bc2e386.tar.bz2
updates from whiterussian
SVN-Revision: 1504
Diffstat (limited to 'openwrt/package/base-files/default/sbin/ifup')
-rwxr-xr-xopenwrt/package/base-files/default/sbin/ifup4
1 files changed, 3 insertions, 1 deletions
diff --git a/openwrt/package/base-files/default/sbin/ifup b/openwrt/package/base-files/default/sbin/ifup
index 3d81364..5dac3f9 100755
--- a/openwrt/package/base-files/default/sbin/ifup
+++ b/openwrt/package/base-files/default/sbin/ifup
@@ -12,6 +12,9 @@ if_valid $if || exit
mac=$(nvram get ${type}_hwaddr)
$DEBUG ifconfig $if down 2>&-
+pidfile=/var/run/${if}.pid
+[ -f $pidfile ] && $DEBUG kill $(cat $pidfile)
+
if [ "${if%%[0-9]}" = "br" ]; then
stp=$(nvram get ${type}_stp)
$DEBUG brctl delbr $if 2>&-
@@ -47,7 +50,6 @@ case "$if_proto" in
;;
dhcp)
ip=$(nvram get ${type}_ipaddr)
- [ -f $pidfile ] && $DEBUG kill $(cat $pidfile)
${DEBUG:-eval} "udhcpc -R -i $if ${ip:+-r $ip} -b -p $pidfile &"
;;
none|"")