[OE-core] [PATCH 6/6] at: add init.d/atd status command for LSB compliance
jackie.huang at windriver.com
jackie.huang at windriver.com
Tue Aug 20 03:25:46 UTC 2013
From: Jackie Huang <jackie.huang at windriver.com>
Signed-off-by: Li Wang <li.wang at windriver.com>
Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
---
meta/recipes-extended/at/files/S99at | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-extended/at/files/S99at b/meta/recipes-extended/at/files/S99at
index 386f8a4..d2ba34b 100644
--- a/meta/recipes-extended/at/files/S99at
+++ b/meta/recipes-extended/at/files/S99at
@@ -5,6 +5,9 @@
umask 077
+# Source function library.
+. /etc/init.d/functions
+
start() {
echo -n "Starting atd: "
start-stop-daemon --start --quiet --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f
@@ -20,6 +23,11 @@ restart() {
start
}
+rh_status() {
+ # run checks to determine if the service is running or use generic status
+ status /usr/sbin/atd
+}
+
case "$1" in
start)
start
@@ -30,8 +38,11 @@ case "$1" in
restart|reload)
restart
;;
+ status)
+ rh_status
+ ;;
*)
- echo $"Usage: $0 {start|stop|restart}"
+ echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac
--
1.7.4.1
More information about the Openembedded-core
mailing list