]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- function get_ppp_device_and_pid added. It extracts PID and REALDEVICE from
authorJacek Konieczny <jajcus@pld-linux.org>
Fri, 21 Apr 2000 17:37:53 +0000 (17:37 +0000)
committerJacek Konieczny <jajcus@pld-linux.org>
Fri, 21 Apr 2000 17:37:53 +0000 (17:37 +0000)
  /var/run/ppp-*.pid

svn-id: @718

rc.d/init.d/functions.network

index dd7c39afe54c527d60b0bf6e90d4512bfd0ed461..a43245495660bb4a6fa4f3a334fe34ee6e968d55 100755 (executable)
@@ -1,6 +1,6 @@
 #
-# $Id: functions.network,v 1.40 2000/04/18 08:30:16 jajcus Exp $
-# vi:syntax=sh
+# $Id: functions.network,v 1.41 2000/04/21 17:37:53 jajcus Exp $
+# 
 # This is not a shell script; it provides functions to network scripts
 # that source it.
 
@@ -438,4 +438,13 @@ echo $MASK
 return
 }
 
-
+# Retrievies PPPD PID and real interface name from /var/run/ppp-*.pid
+get_ppp_device_and_pid () {
+       
+       if [ -f "/var/run/ppp-$DEVICE.pid" ] ; then
+               eval `{
+                        read PID ; echo "PID='$PID'" 
+                        read REALDEVICE ; echo "REALDEVICE=$REALDEVICE"
+                     } < "/var/run/ppp-$DEVICE.pid"`
+       fi
+}
This page took 0.245331 seconds and 4 git commands to generate.