xinetd: add status of init.d command
authorLi Wang <li.wang@windriver.com>
Tue, 26 Nov 2013 10:18:26 +0000 (18:18 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 14 Dec 2013 09:11:11 +0000 (09:11 +0000)
(From OE-Core rev: 05c3bad6835d7e51b20e23ffd7708545b1ed81a1)

Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/xinetd/xinetd/xinetd.init

index 26dbea7..777c2c8 100644 (file)
@@ -2,6 +2,9 @@
 #
 # /etc/init.d/xinetd  --  script to start and stop xinetd.
 
+# Source function library.
+. /etc/init.d/functions
+
 if test -f /etc/default/xinetd; then
        . /etc/default/xinetd
 fi
@@ -33,6 +36,10 @@ case "$1" in
        start-stop-daemon --stop --signal 3 --quiet --exec /usr/sbin/xinetd
        echo "."
        ;;
+    status)
+       status /usr/sbin/xinetd;
+       exit $?
+       ;;
     reload)
        echo -n "Reloading internet superserver configuration: xinetd"
        start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
@@ -49,7 +56,7 @@ case "$1" in
        $0 start
        ;;
     *)
-       echo "Usage: /etc/init.d/xinetd {start|stop|reload|force-reload|restart}"
+       echo "Usage: /etc/init.d/xinetd {start|stop|status|reload|force-reload|restart}"
        exit 1
        ;;
 esac