/rc4.d/S70dns-clean

http://github.com/brinkman83/bashrc · Shell · 49 lines · 18 code · 12 blank · 19 comment · 7 complexity · 0891334491535dc069295640056d692d MD5 · raw file

  1. #! /bin/sh
  2. # $Id: dns-clean,v 1.1.1.1 2004/05/07 03:12:59 john Exp $
  3. # dns-clean by John Hasler 1999-2003
  4. # Any possessor of a copy of this program may treat it as if it
  5. # were in the public domain. I waive all rights.
  6. # This script should be run at bootup to clean up any mess left by 0dns-up.
  7. # It should be run before ppp is started.
  8. # It should never be run while ppp is up.
  9. ### BEGIN INIT INFO
  10. # Provides: dns-clean
  11. # Required-Start: $local_fs gdm
  12. # Required-Stop: $local_fs
  13. # Default-Start: 1 2 3 4 5
  14. # Default-Stop:
  15. # Short-Description: Cleans up any mess left by 0dns-up
  16. # Description: 0dns-up often leaves behind some cruft. This Script is meant
  17. # to clean up any such mess.
  18. ### END INIT INFO
  19. PATH=/sbin:/bin:/usr/sbin:/usr/bin
  20. test -f /usr/sbin/pppconfig || exit 0
  21. # We might have a tmpfs /var/run.
  22. mkdir /var/run/pppconfig >/dev/null 2>&1 || true
  23. test -f /etc/ppp/ip-down.d/0dns-down || exit 0
  24. . /lib/lsb/init-functions
  25. . /etc/default/rcS
  26. case "$1" in
  27. start)
  28. [ "$VERBOSE" != no ] && log_begin_msg "Restoring resolver state..."
  29. /etc/ppp/ip-down.d/0dns-down "0dns-clean"
  30. [ "$VERBOSE" != no ] && log_end_msg $?
  31. ;;
  32. stop|restart|force-reload)
  33. ;;
  34. *)
  35. ;;
  36. esac
  37. exit 0