Skip to contentSkip to conversation

ppp: add status command

PATCH New [email protected] 1 participant 1 message Nov 29, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppp: add status command

From: Li Wang <[email protected]>

---
 meta/recipes-connectivity/ppp/ppp-2.4.5/init | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-connectivity/ppp/ppp-2.4.5/init +8 -1
index 5b3b7ab..0c01360 100755
@@ -6,6 +6,9 @@
 # rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and
 # follow the instructions in the comments in that file.
 
+# Source function library.
+. /etc/init.d/functions
+
 test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0
 if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi
 
@@ -28,6 +31,10 @@ case "$1" in
       fi
       echo "."
     ;;
+  status)
+    status /usr/sbin/pppd;
+    exit $?
+    ;;
   restart|force-reload)
     echo -n "Restarting PPP link: pppd"
     if [ "$RUNFILE" = "1" ]; then      
@@ -42,7 +49,7 @@ case "$1" in
     echo "."
     ;;
   *)
-      echo "Usage: /etc/init.d/ppp {start|stop|restart|force-reload}"
+      echo "Usage: /etc/init.d/ppp {start|stop|status|restart|force-reload}"
       exit 1
     ;;
 esac
Signature · 1 line
1.8.3