X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/3d007394805916ceb2214bfd7e06d8a4899262c5..5a9ca50d8e237b74b91ffcc9b7eda6ea18efeb6f:/openwrt/package/base-files/default/sbin/ifup diff --git a/openwrt/package/base-files/default/sbin/ifup b/openwrt/package/base-files/default/sbin/ifup index 3d81364d0..5dac3f998 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|"")