Skip to content

Commit

Permalink
ypbind-yocto.init: add status command
Browse files Browse the repository at this point in the history
Add the "status" command to check the status of ypbind.

Signed-off-by: Zhu Yanjun <yanjun.zhu@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
  • Loading branch information
Zhu Yanjun authored and shr-project committed Aug 17, 2015
1 parent d1d5155 commit ba3aee2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions meta-networking/recipes-support/nis/files/ypbind-yocto.init
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ba3aee2

Please sign in to comment.