30 lines
933 B
Plaintext
30 lines
933 B
Plaintext
$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
|