packages/net/isc-dhcp/files/dhclient6.init
luka 27814fecd9 [packages] dhcp: rename to isc-dhcp and fix ipv6 support
git-svn-id: svn://svn.openwrt.org/openwrt/packages@32897 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-07-27 20:59:55 +00:00

31 lines
490 B
Bash

#!/bin/sh /etc/rc.common
START=60
lease_file=/var/dhclient6.leases
config_file=/etc/dhclient6.conf
pid_file=/var/run/dhclient6.pid
script_file=/usr/sbin/dhclient-script
start() {
/usr/sbin/dhclient -q -nw -6 -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file `/sbin/uci get network.wan.ifname`
if [ $? -ne 0 ]; then
return 1
fi
}
stop() {
if [ ! -e $pid_file ]; then
return 1
fi
kill -9 `cat $pid_file`
if [ $? -ne 0 ]; then
return 1
fi
rm $pid_file
}