aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael K. Johnson <johnsonm@redhat.com>1997-09-16 19:19:18 +0000
committerMichael K. Johnson <johnsonm@redhat.com>1997-09-16 19:19:18 +0000
commit10379fc45f662dcbcd12696a43f19033911bef6a (patch)
tree95f37a85097e5c6357bce9c6d06f294f4f0efaf3
parent0729079712be64f9fdf1747db27061a90f32c267 (diff)
downloadinitscripts-10379fc45f662dcbcd12696a43f19033911bef6a.tar
initscripts-10379fc45f662dcbcd12696a43f19033911bef6a.tar.gz
initscripts-10379fc45f662dcbcd12696a43f19033911bef6a.tar.bz2
initscripts-10379fc45f662dcbcd12696a43f19033911bef6a.tar.xz
initscripts-10379fc45f662dcbcd12696a43f19033911bef6a.zip
Bring down pppd even if only ifup-ppp is running, waiting to persist.
-rwxr-xr-xsysconfig/network-scripts/ifdown-ppp8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifdown-ppp b/sysconfig/network-scripts/ifdown-ppp
index 84325ca6..f3226419 100755
--- a/sysconfig/network-scripts/ifdown-ppp
+++ b/sysconfig/network-scripts/ifdown-ppp
@@ -11,13 +11,15 @@ if [ ! -f /var/run/ppp-$DEVICE.dev ]; then
fi
file=/var/run/`cat /var/run/ppp-$DEVICE.dev`.pid
+
+# signals ifup-ppp not to persist -- must do this before exiting if PPP
+# has not yet started ($file does not exist).
+rm -f /var/run/ppp-$DEVICE.dev
+
if [ ! -f $file ]; then
exit 0
fi
-# signals ifup-ppp not to persist
-rm -f /var/run/ppp-$DEVICE.dev
-
PID=`cat $file`
if [ -z "$PID" ]; then
exit 1