summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2004-10-22 03:39:29 +0000
committerAron Griffis <agriffis@gentoo.org>2004-10-22 03:39:29 +0000
commitde50105ba61833358b70b3ba701559323bf94e71 (patch)
treef4a1f4d8e81e5f4e4761a4d1b6de6951dcbb9aac /net-dialup/rp-pppoe/files
parentrepoman: Trim trailing whitespace (diff)
downloadhistorical-de50105ba61833358b70b3ba701559323bf94e71.tar.gz
historical-de50105ba61833358b70b3ba701559323bf94e71.tar.bz2
historical-de50105ba61833358b70b3ba701559323bf94e71.zip
add patch for testing with baselayout-1.11.x netscripts
Diffstat (limited to 'net-dialup/rp-pppoe/files')
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.5-netscripts.patch110
1 files changed, 110 insertions, 0 deletions
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.5-netscripts.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.5-netscripts.patch
new file mode 100644
index 000000000000..d35d74bd3d5a
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.5-netscripts.patch
@@ -0,0 +1,110 @@
+diff -urN rp-pppoe-3.5/configs/pppoe.conf rp-pppoe-3.5.agriffis/configs/pppoe.conf
+--- rp-pppoe-3.5/configs/pppoe.conf 2002-07-08 10:38:24.000000000 -0400
++++ rp-pppoe-3.5.agriffis/configs/pppoe.conf 2004-10-21 23:23:48.490710213 -0400
+@@ -21,6 +21,9 @@
+ # When you configure a variable, DO NOT leave spaces around the "=" sign.
+
+ # Ethernet card connected to ADSL modem
++#
++# NB: Gentoo overrides ETH when adsl-start is called from the
++# networking scripts. This setting has no effect in that case.
+ ETH=eth1
+
+ # ADSL user name. You may have to supply "@provider.com" Sympatico
+@@ -86,6 +89,9 @@
+ # $PIDFILE contains PID of adsl-connect script
+ # $PIDFILE.pppoe contains PID of pppoe process
+ # $PIDFILE.pppd contains PID of pppd process
++#
++# NB: Gentoo overrides PIDFILE when adsl-start is run from the
++# networking scripts. This setting has no effect in that case.
+ CF_BASE=`basename $CONFIG`
+ PIDFILE="/var/run/$CF_BASE-adsl.pid"
+
+diff -urN rp-pppoe-3.5/scripts/adsl-connect.in rp-pppoe-3.5.agriffis/scripts/adsl-connect.in
+--- rp-pppoe-3.5/scripts/adsl-connect.in 2002-07-08 10:38:24.000000000 -0400
++++ rp-pppoe-3.5.agriffis/scripts/adsl-connect.in 2004-10-21 23:07:06.421795686 -0400
+@@ -62,7 +62,9 @@
+ ;;
+ esac
+
+-if test ! -f "$CONFIG" -o ! -r "$CONFIG" ; then
++# In Gentoo, CONFIG is a named pipe when adsl is started by the
++# network scripts. Testing -r is allowed; testing -f is not.
++if test ! -r "$CONFIG" ; then
+ echo "$0: Cannot read configuration file '$CONFIG'" >& 2
+ exit 1
+ fi
+diff -urN rp-pppoe-3.5/scripts/adsl-start.in rp-pppoe-3.5.agriffis/scripts/adsl-start.in
+--- rp-pppoe-3.5/scripts/adsl-start.in 2002-07-08 10:38:24.000000000 -0400
++++ rp-pppoe-3.5.agriffis/scripts/adsl-start.in 2004-10-21 23:11:47.318117476 -0400
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # @configure_input@
+ #***********************************************************************
+ #
+@@ -113,12 +113,17 @@
+ ;;
+ esac
+
+-if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
++# In Gentoo, CONFIG is a named pipe when adsl is started by the
++# network scripts. Testing -r is allowed; testing -f is not.
++if [ ! -r "$CONFIG" ] ; then
+ $ECHO "$ME: Cannot read configuration file '$CONFIG'" >& 2
+ exit 1
+ fi
+
+-. $CONFIG
++# Read the named pipe (/dev/fd/foo) into a variable so we can use it
++# again later (since reading once from the pipe will exhaust it)
++CONFREAD=$(<$CONFIG)
++eval "$CONFREAD"
+
+ # Check for command-line overriding of ETH and USER
+ case "$#" in
+@@ -164,7 +169,7 @@
+ # Monitor connection
+ TIME=0
+ while [ true ] ; do
+- @sbindir@/adsl-status $CONFIG > /dev/null 2>&1
++ @sbindir@/adsl-status <(echo "$CONFREAD") >/dev/null 2>&1
+
+ # Looks like the interface came up
+ if [ $? = 0 ] ; then
+diff -urN rp-pppoe-3.5/scripts/adsl-status rp-pppoe-3.5.agriffis/scripts/adsl-status
+--- rp-pppoe-3.5/scripts/adsl-status 2002-07-08 10:38:24.000000000 -0400
++++ rp-pppoe-3.5.agriffis/scripts/adsl-status 2004-10-21 23:13:22.901045096 -0400
+@@ -28,7 +28,9 @@
+ ;;
+ esac
+
+-if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
++# In Gentoo, CONFIG is a named pipe when adsl is started by the
++# network scripts. Testing -r is allowed; testing -f is not.
++if [ ! -r "$CONFIG" ] ; then
+ echo "$0: Cannot read configuration file '$CONFIG'" >& 2
+ exit 1
+ fi
+@@ -81,4 +83,4 @@
+
+ echo "adsl-status: Link is down -- could not find interface corresponding to"
+ echo "pppd pid $PPPD_PID"
+-exit 1
+\ No newline at end of file
++exit 1
+diff -urN rp-pppoe-3.5/scripts/adsl-stop.in rp-pppoe-3.5.agriffis/scripts/adsl-stop.in
+--- rp-pppoe-3.5/scripts/adsl-stop.in 2002-07-08 10:38:24.000000000 -0400
++++ rp-pppoe-3.5.agriffis/scripts/adsl-stop.in 2004-10-21 23:14:00.818098880 -0400
+@@ -31,7 +31,9 @@
+ CONFIG=/etc/ppp/pppoe.conf
+ fi
+
+-if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
++# In Gentoo, CONFIG is a named pipe when adsl is started by the
++# network scripts. Testing -r is allowed; testing -f is not.
++if [ ! -r "$CONFIG" ] ; then
+ echo "$ME: Cannot read configuration file '$CONFIG'" >& 2
+ exit 1
+ fi