Patchwork [4/6] sysvinit: add init.d/bootlogd status command for LSB compliance

login
register
mail settings
Submitter jackie huang
Date Aug. 22, 2013, 6:17 a.m.
Message ID <71fc3d262ac8ae580878cebf8dbfea6cb4ecddae.1377151850.git.jackie.huang@windriver.com>
Download mbox | patch
Permalink /patch/56157/
State New
Headers show

Comments

jackie huang - Aug. 22, 2013, 6:17 a.m.
From: Jackie Huang <jackie.huang@windriver.com>

Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 meta/recipes-core/sysvinit/sysvinit/bootlogd.init |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
index f8f07a0..7b87827 100755
--- a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
+++ b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
@@ -13,6 +13,9 @@  DAEMON=/sbin/bootlogd
 NAME=bootlogd
 DESC="Bootlog daemon"
 
+# source function library
+. /etc/init.d/functions
+
 test -f $DAEMON || exit 0
 
 [ -r /etc/default/bootlogd ] && . /etc/default/bootlogd
@@ -73,10 +76,14 @@  case "$ACTION" in
 		start-stop-daemon --start --quiet --exec $DAEMON
 		echo "$NAME."
 		;;
+	status)
+		status $DAEMON
+		exit $?
+		;;
 	*)
 		N=${0##*/}
 		N=${N#[SK]??}
-		echo "Usage: $N {start|stop|restart|force-reload}" >&2
+		echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
 		exit 1
 		;;
 esac