Contents of /trunk/ppp/ip-downd-40-dns.sh
Parent Directory | Revision Log
Revision 796 -
(show annotations)
(download)
(as text)
Mon May 11 09:39:21 2009 UTC (15 years, 4 months ago) by niro
File MIME type: application/x-sh
File size: 640 byte(s)
Mon May 11 09:39:21 2009 UTC (15 years, 4 months ago) by niro
File MIME type: application/x-sh
File size: 640 byte(s)
new ip up down from gentoo
1 | #!/bin/sh |
2 | |
3 | # Restore DNS resolver settings |
4 | # Used parameters and environment variables: |
5 | # $1 - interface name (e.g. ppp0) |
6 | # $USEPEERDNS - set if user specified usepeerdns |
7 | |
8 | if [ "$USEPEERDNS" ]; then |
9 | if [ -x /sbin/resolvconf ]; then |
10 | /sbin/resolvconf -d "$1" |
11 | else |
12 | # taken from debian's 0000usepeerdns |
13 | # follow any symlink to find the real file |
14 | REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf) |
15 | |
16 | if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then |
17 | |
18 | # if an old resolv.conf file exists, restore it |
19 | if [ -e $REALRESOLVCONF.pppd-backup ]; then |
20 | mv $REALRESOLVCONF.pppd-backup $REALRESOLVCONF |
21 | fi |
22 | |
23 | fi |
24 | fi |
25 | fi |