blob: e64658b9cd04d469d4da28e8ddc40a7467eda6bb (
plain)
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
|
$NetBSD: patch-af,v 1.3 2006/11/01 15:17:14 martin Exp $
--- scripts/pppoe-connect.in.orig Mon Jul 8 16:38:24 2002
+++ scripts/pppoe-connect.in Mon Oct 7 22:31:42 2002
@@ -218,12 +218,20 @@
# Jigger DNS if required...
if test "$DNSTYPE" = "SERVER" ; then
- # Sorry, dude...
- rm -f /etc/resolv.conf
+ if test -f /etc/resolv.conf -a ! -f /etc/resolv.conf.rp-pppoe-save
+ then
+ mv /etc/resolv.conf /etc/resolv.conf.rp-pppoe-save
+ else
+ rm -f /etc/resolv.conf
+ fi
ln -s /etc/ppp/resolv.conf /etc/resolv.conf
elif test "$DNSTYPE" = "SPECIFY" ; then
- # Sorry, dude...
- rm -f /etc/resolv.conf
+ if test -f /etc/resolv.conf -a ! -f /etc/resolv.conf.rp-pppoe-save
+ then
+ mv /etc/resolv.conf /etc/resolv.conf.rp-pppoe-save
+ else
+ rm -f /etc/resolv.conf
+ fi
echo "nameserver $DNS1" > /etc/resolv.conf
if test -n "$DNS2" ; then
echo "nameserver $DNS2" >> /etc/resolv.conf
|