[oe-commits] Zhu Yanjun : ypbind-yocto.init: add status command

git at git.openembedded.org git at git.openembedded.org
Mon Aug 17 21:44:59 UTC 2015


Module: meta-openembedded.git
Branch: master-next
Commit: ba3aee23e2d776d822f5daddd38a8f07becd7c13
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=ba3aee23e2d776d822f5daddd38a8f07becd7c13

Author: Zhu Yanjun <yanjun.zhu at windriver.com>
Date:   Mon Jul  6 16:29:39 2015 +0800

ypbind-yocto.init: add status command

Add the "status" command to check the status of ypbind.

Signed-off-by: Zhu Yanjun <yanjun.zhu at windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 meta-networking/recipes-support/nis/files/ypbind-yocto.init | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta-networking/recipes-support/nis/files/ypbind-yocto.init b/meta-networking/recipes-support/nis/files/ypbind-yocto.init
index 2c50d12..244dc78 100644
--- a/meta-networking/recipes-support/nis/files/ypbind-yocto.init
+++ b/meta-networking/recipes-support/nis/files/ypbind-yocto.init
@@ -21,6 +21,9 @@
 #	the NIS binding information.
 ### END INIT INFO
 
+# Need to use status function
+. /etc/init.d/functions
+
 YPBIND_BIN=/usr/sbin/ypbind
 pidfile=/var/run/ypbind.pid
 
@@ -92,6 +95,10 @@ case "$1" in
 	echo -n "Reload service ypbind"
 	start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile
 	;;
+    status)
+	echo -n "Checking for ypbind: "
+	status $YPBIND_BIN
+	;;
     *)
 	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
 	exit 1



More information about the Openembedded-commits mailing list