/init.d/ifupdown-scripts-zg2

http://github.com/brinkman83/bashrc · Shell · 34 lines · 19 code · 5 blank · 10 comment · 2 complexity · d148776b24f23ce65e03eba7dca5bc3b MD5 · raw file

  1. #!/bin/sh
  2. set -e
  3. STATEDIR="/etc/network/run/ifupdown-scripts-zg2"
  4. ### BEGIN INIT INFO
  5. # Provides: ifupdown-scripts-zg2
  6. # Required-Start: checkroot
  7. # Required-Stop:
  8. # X-Start-Before: ifupdown networking
  9. # Default-Start: S
  10. # Default-Stop:
  11. # Short-Description: clean ifupdown-scripts-zg2 state files
  12. ### END INIT INFO
  13. if [ -r "/lib/lsb/init-functions" ]; then
  14. . /lib/lsb/init-functions
  15. else
  16. echo "E: /lib/lsb/init-functions not found, lsb-base (>= 3.0-6) needed"
  17. exit 1
  18. fi
  19. case "$1" in
  20. start|restart)
  21. if [ -e $STATEDIR ]; then
  22. log_begin_msg -n "Cleaning: $STATEDIR"
  23. rm -f $STATEDIR/*
  24. log_end_msg 0
  25. fi
  26. ;;
  27. stop|reload|force-reload)
  28. ;;
  29. esac