From: Mike Baker Date: Mon, 18 Jul 2005 02:45:52 +0000 (+0000) Subject: fix $pidfile in dhcp X-Git-Tag: whiterussian_rc4~294 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5b5759b0ea664de8393dc6217c54a72f4b243946;p=openwrt%2Fsvn-archive%2Fopenwrt.git fix $pidfile in dhcp SVN-Revision: 1497 --- diff --git a/openwrt/target/default/target_skeleton/sbin/ifup b/openwrt/target/default/target_skeleton/sbin/ifup index 3d81364d08..5dac3f9987 100755 --- a/openwrt/target/default/target_skeleton/sbin/ifup +++ b/openwrt/target/default/target_skeleton/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|"")