File: dns-clean

package info (click to toggle)
pppconfig 2.3.18
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,376 kB
  • ctags: 82
  • sloc: perl: 1,460; sh: 152; makefile: 61
file content (45 lines) | stat: -rwxr-xr-x 1,157 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /bin/sh

# $Id: dns-clean,v 1.1.1.1 2004/05/07 03:12:59 john Exp $

# dns-clean by John Hasler 1999-2003
# Any possessor of a copy of this program may treat it as if it
# were in the public domain.  I waive all rights.

# This script should be run at bootup to clean up any mess left by 0dns-up.
# It should be run before ppp is started.
# It should never be run while ppp is up.

### BEGIN INIT INFO
# Provides:          dns-clean
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     S
# Default-Stop:
# Short-Description: Cleans up any mess left by 0dns-up
# Description: 0dns-up often leaves behind some cruft. This Script is meant
#              to clean up any such mess.
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

test -f /usr/sbin/pppconfig || exit 0
# We might have a tmpfs /var/run.
mkdir /var/run/pppconfig >/dev/null 2>&1 || true
test -f /etc/ppp/ip-down.d/0dns-down || exit 0

case "$1" in
  start)
	/bin/echo -n "Running 0dns-down to make sure resolv.conf is ok..."
	/etc/ppp/ip-down.d/0dns-down "0dns-clean" && /bin/echo "done."
	;;
  stop|restart|force-reload)
	;;
  *)
        ;;
esac

exit 0