]> code.ossystems Code Review - openembedded-core.git/commitdiff
ppp: add status command
authorLi Wang <li.wang@windriver.com>
Fri, 29 Nov 2013 10:55:53 +0000 (18:55 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 Nov 2013 16:27:03 +0000 (16:27 +0000)
Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/ppp/ppp-2.4.5/init

index 5b3b7abe2fecad5ca18aec711ce671631e1adebb..0c0136049bbebc9d5a5afba9b67adfde9ab573d8 100755 (executable)
@@ -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