pkgsrc/net/rp-pppoe/patches/patch-af
martin a8911c661d Update rp-pppoe to 3.8: various internal changes, some of them bogus
and reverted by patches, some of them were already present in (now
removed) patches; plus:

- Changed the names of commands from adsl-* to pppoe-* to more logically
  name the scripts.

- Make the userland pppoe daemon run as "nobody" if possible, once session
  has started.

- Make userland pppoe program somewhat safe if it is installed SUID or
  SGID.  Note that I still do *NOT* recommend a SUID/SGID pppoe.

- Fix long-standing bug in pppoe-server that passed arguments to pppd in the
  wrong order.
2006-11-01 15:17:13 +00:00

29 lines
933 B
Text

$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