aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-09-15 05:41:44 +0000
committerBill Nottingham <notting@redhat.com>2003-09-15 05:41:44 +0000
commit7e6227579d123844297a832ac75d91922cdbe555 (patch)
tree297fca6ca57f6fef50fc6aa17d5f3c818b291bf1
parenta32681ea9aec9b73fe7dd0b65a20b1321db3b48b (diff)
downloadinitscripts-7e6227579d123844297a832ac75d91922cdbe555.tar
initscripts-7e6227579d123844297a832ac75d91922cdbe555.tar.gz
initscripts-7e6227579d123844297a832ac75d91922cdbe555.tar.bz2
initscripts-7e6227579d123844297a832ac75d91922cdbe555.tar.xz
initscripts-7e6227579d123844297a832ac75d91922cdbe555.zip
ppp fixes (#104128, #97845, #85447)
-rw-r--r--src/ppp-watch.c6
-rwxr-xr-xsysconfig/network-scripts/ifdown-ppp6
-rwxr-xr-xsysconfig/network-scripts/ifup-ppp2
3 files changed, 8 insertions, 6 deletions
diff --git a/src/ppp-watch.c b/src/ppp-watch.c
index 6a304179..2a4738a5 100644
--- a/src/ppp-watch.c
+++ b/src/ppp-watch.c
@@ -609,7 +609,7 @@ main(int argc, char **argv) {
dying = TRUE;
/* Get the pid of our child pppd. */
- pppLogicalToPhysical(&pppdPid, real_device, NULL);
+ pppLogicalToPhysical(&pppdPid, device, NULL);
/* We don't know what our child pid is. This is very confusing. */
if (!pppdPid) {
@@ -639,7 +639,7 @@ main(int argc, char **argv) {
ifcfg = shvarfilesGet(device);
/* Get the PID of our child pppd. */
- pppLogicalToPhysical(&pppdPid, real_device, NULL);
+ pppLogicalToPhysical(&pppdPid, device, NULL);
kill(pppdPid, SIGTERM);
/* We'll redial when the SIGCHLD arrives, even if PERSIST is
@@ -657,7 +657,7 @@ main(int argc, char **argv) {
if (theSigio) {
theSigio = 0;
- pppLogicalToPhysical(NULL, real_device, &physicalDevice);
+ pppLogicalToPhysical(NULL, device, &physicalDevice);
if (physicalDevice) {
if (interfaceIsUp(physicalDevice)) {
/* The interface is up, so report a success to a parent if
diff --git a/sysconfig/network-scripts/ifdown-ppp b/sysconfig/network-scripts/ifdown-ppp
index 4d8cfb75..9455d48a 100755
--- a/sysconfig/network-scripts/ifdown-ppp
+++ b/sysconfig/network-scripts/ifdown-ppp
@@ -11,8 +11,10 @@ if [ "$TYPE" = "xDSL" ] && [ -x /sbin/adsl-stop -o -x /usr/sbin/adsl-stop ] ; th
exit $?
fi
-if [ "${DEMAND}" = "yes" -a -f /var/run/ppp-${DEVICE}.pid ] ; then
- PID=`head -1 /var/run/ppp-${DEVICE}.pid`
+CONFIG=${CONFIG##ifcfg-}
+
+if [ "${DEMAND}" = "yes" -a -f /var/run/ppp-${CONFIG}.pid ] ; then
+ PID=`head -1 /var/run/ppp-${CONFIG}.pid`
kill -TERM ${PID}
sleep 2
[ ! -d /proc/${PID} ] && exit 0
diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp
index 99b0e79f..3d26ebe8 100755
--- a/sysconfig/network-scripts/ifup-ppp
+++ b/sysconfig/network-scripts/ifup-ppp
@@ -18,7 +18,7 @@ else
if [ "${DEMAND}" != yes -a "$TYPE" != "xDSL" ] ; then
# let ppp-watch do the right thing
shift
- exec /sbin/ppp-watch "${DEVICE}" "$2"
+ exec /sbin/ppp-watch "${CONFIG##ifcfg-}" "$2"
fi
fi