Subject: rp-pppoe patch for NetBSD
To: None <netbsd-users@netbsd.org>
From: Bang Jun-Young <bjy@mogua.org>
List: netbsd-users
Date: 12/02/2000 21:49:31
This is a multi-part message in MIME format.
--------------F41FC2F9B693F759102723FE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I've made a patch which includes fixes to the following:
1) the directory in which pid files are created has been changed to
/var/run from /etc/ppp.
2) When adsl-setup is finalizing the installation, an error occurs if
there doesn't exist /etc/resolv.conf.
I tested it with rp-pppoe-2.3 on NetBSD 1.5_BETA2 and -current, and hope
it helps somebody.
--
Bang Jun-Young <bjy@mogua.org>
--------------F41FC2F9B693F759102723FE
Content-Type: text/plain; charset=us-ascii;
name="netbsd.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="netbsd.patch"
--- adsl-status Tue Sep 19 03:38:09 2000
+++ adsl-status.new Sun Dec 3 05:49:33 2000
@@ -20,9 +20,9 @@
# Defaults
CONFIG=/etc/ppp/pppoe.conf
case `uname -s` in
- *BSD)
- VARRUN="/etc/ppp"
- ;;
+# *BSD)
+# VARRUN="/etc/ppp"
+# ;;
*)
VARRUN="/var/run"
;;
--- adsl-setup.in Tue Sep 19 03:38:09 2000
+++ adsl-setup.in.new Sun Dec 3 06:06:41 2000
@@ -275,11 +275,16 @@
if [ "$DNS1" != "" ] ; then
if [ "$DNS1" != "server" ] ; then
- echo "Adjusting /etc/resolv.conf"
- grep -s "MADE-BY-RP-PPPOE" /etc/resolv.conf > /dev/null 2>&1
- if [ "$?" != 0 ] ; then
- echo " (But first backing it up to /etc/resolv.conf-bak)"
- copy /etc/resolv.conf /etc/resolv.conf-bak
+ if [ ! -e /etc/resolv.conf ] ; then
+ echo "Creating /etc/resolv.conf"
+ touch /etc/resolv.conf
+ else
+ echo "Adjusting /etc/resolv.conf"
+ grep -s "MADE-BY-RP-PPPOE" /etc/resolv.conf > /dev/null 2>&1
+ if [ "$?" != 0 ] ; then
+ echo " (But first backing it up to /etc/resolv.conf-bak)"
+ copy /etc/resolv.conf /etc/resolv.conf-bak
+ fi
fi
echo "# MADE-BY-RP-PPPOE" > /etc/resolv.conf
echo "nameserver $DNS1" >> /etc/resolv.conf
--------------F41FC2F9B693F759102723FE--