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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
This patch allows Gentoo to reliably shut down the interface even if
the configuration changes between "net.eth0 up" and "net.eth0 down"
(14 Jun 2004 agriffis)
--- rp-pppoe-3.5/configs/pppoe.conf.agriffis 2002-07-08 10:38:24.000000000 -0400
+++ rp-pppoe-3.5/configs/pppoe.conf 2004-06-14 22:12:01.412927476 -0400
@@ -86,6 +86,11 @@
# $PIDFILE contains PID of adsl-connect script
# $PIDFILE.pppoe contains PID of pppoe process
# $PIDFILE.pppd contains PID of pppd process
+#
+# NB: When adsl-start is called from net.eth0, PIDFILE is overruled by
+# a Gentoo patch to adsl-start to allow proper shutdown of devices
+# even when configuration changes. In that case, the PIDFILE setting
+# here has no effect.
CF_BASE=`basename $CONFIG`
PIDFILE="/var/run/$CF_BASE-adsl.pid"
--- rp-pppoe-3.5/scripts/adsl-stop.in.agriffis 2002-07-08 10:38:24.000000000 -0400
+++ rp-pppoe-3.5/scripts/adsl-stop.in 2004-06-14 22:12:01.414927139 -0400
@@ -38,6 +38,14 @@
. $CONFIG
+# For Gentoo, override the PIDFILE with our own definition
+# based on the interface. This makes it possible to reliably
+# shut down ADSL on an interface even if configuration
+# changes. GENTOO_PIDFILE is set in /etc/init.d/net.eth0
+if [[ -n ${GENTOO_PIDFILE} ]]; then
+ PIDFILE=${GENTOO_PIDFILE}
+fi
+
PPPOE_PIDFILE="$PIDFILE.pppoe"
PPPD_PIDFILE="$PIDFILE.pppd"
STARTPID="$PIDFILE.start"
--- rp-pppoe-3.5/scripts/adsl-start.in.agriffis 2002-07-08 10:38:24.000000000 -0400
+++ rp-pppoe-3.5/scripts/adsl-start.in 2004-06-14 22:12:01.413927308 -0400
@@ -120,6 +120,14 @@
. $CONFIG
+# For Gentoo, override the PIDFILE with our own definition
+# based on the interface. This makes it possible to reliably
+# shut down ADSL on an interface even if configuration
+# changes. GENTOO_PIDFILE is set in /etc/init.d/net.eth0
+if [[ -n ${GENTOO_PIDFILE} ]]; then
+ PIDFILE=${GENTOO_PIDFILE}
+fi
+
# Check for command-line overriding of ETH and USER
case "$#" in
2|3)
--- rp-pppoe-3.5/scripts/adsl-connect.in.agriffis 2004-06-14 22:27:04.000000000 -0400
+++ rp-pppoe-3.5/scripts/adsl-connect.in 2004-06-14 22:27:12.234534823 -0400
@@ -69,6 +69,14 @@
. $CONFIG
+# For Gentoo, override the PIDFILE with our own definition
+# based on the interface. This makes it possible to reliably
+# shut down ADSL on an interface even if configuration
+# changes. GENTOO_PIDFILE is set in /etc/init.d/net.eth0
+if [[ -n ${GENTOO_PIDFILE} ]]; then
+ PIDFILE=${GENTOO_PIDFILE}
+fi
+
PPPOE_PIDFILE="$PIDFILE.pppoe"
PPPD_PIDFILE="$PIDFILE.pppd"
--- rp-pppoe-3.5/scripts/adsl-status.agriffis 2002-07-08 10:38:24.000000000 -0400
+++ rp-pppoe-3.5/scripts/adsl-status 2004-06-14 22:29:20.678883904 -0400
@@ -35,6 +35,14 @@
. $CONFIG
+# For Gentoo, override the PIDFILE with our own definition
+# based on the interface. This makes it possible to reliably
+# shut down ADSL on an interface even if configuration
+# changes. GENTOO_PIDFILE is set in /etc/init.d/net.eth0
+if [[ -n ${GENTOO_PIDFILE} ]]; then
+ PIDFILE=${GENTOO_PIDFILE}
+fi
+
PPPOE_PIDFILE="$PIDFILE.pppoe"
PPPD_PIDFILE="$PIDFILE.pppd"
@@ -81,4 +89,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
|