You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
448 B

  1. #!/bin/sh /etc/rc.common
  2. START=65
  3. lease_file=/var/dhcpd6.leases
  4. config_file=/etc/dhcpd6.conf
  5. pid_file=/var/run/dhcpd6.pid
  6. start() {
  7. if [ ! -e $lease_file ]; then
  8. touch $lease_file
  9. fi
  10. /usr/sbin/dhcpd -q -6 -cf $config_file -lf $lease_file -pf $pid_file $dhcp_ifs
  11. if [ $? -ne 0 ]; then
  12. return 1
  13. fi
  14. }
  15. stop() {
  16. if [ ! -e $pid_file ]; then
  17. return 1
  18. fi
  19. kill -9 `cat $pid_file`
  20. if [ $? -ne 0 ]; then
  21. return 1
  22. fi
  23. rm $pid_file
  24. }