blob: c8b81d279d553dc570b953a50a470c2226723c23 [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/dhclient6.${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