blob: a45ae6d91bf864041496962344ce8c544b51e686 [file] [log] [blame]
iface=$1
pidfile=/var/run/dhclient.${iface}.pid
if [ -e $pidfile ]; then
kill $(cat $pidfile) 2>&1 > /dev/null
rm -f $pidfile
fi
pidfile=/var/run/dhclient-v6.${iface}.pid
if [ -e $pidfile ]; then
kill $(cat $pidfile) 2>&1 > /dev/null
rm -f $pidfile
fi
if [ $(cat /etc/config/wanport) = $iface ]; then
pkillwait -x sycl
if [ "x$(cat /etc/config/mgmtvlan)" = "x" ]; then
/usr/sbin/dhclient $iface -r
fi
elif [ "man" = "$iface" ]; then
/usr/sbin/dhclient $iface -r
fi
ip -4 addr flush dev $iface label $iface
ip link set dev $iface down