lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

dhclient6.init (490B)


      1 #!/bin/sh /etc/rc.common
      2 
      3 START=60
      4 
      5 lease_file=/var/dhclient6.leases
      6 config_file=/etc/dhclient6.conf
      7 pid_file=/var/run/dhclient6.pid
      8 script_file=/usr/sbin/dhclient-script
      9 
     10 start() {
     11 	/usr/sbin/dhclient -q -nw -6 -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file `/sbin/uci get network.wan.ifname`
     12 	
     13 	if [ $? -ne 0 ]; then
     14 		return 1
     15 	fi
     16 }
     17 
     18 stop() {
     19 	if [ ! -e $pid_file ]; then
     20 		return 1
     21 	fi
     22 
     23 	kill -9 `cat $pid_file`
     24 
     25 	if [ $? -ne 0 ]; then
     26 		return 1
     27 	fi
     28 	
     29 	rm $pid_file
     30 }