blob: ab2b0e0331707d4d1df83d4b04c489a7a11addcf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
Source /etc/init.d/functions and add sub-command status
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
diff --git a/samples/init.d-spmd.in b/samples/init.d-spmd.in
index d38b825..624f22d 100644
--- a/samples/init.d-spmd.in
+++ b/samples/init.d-spmd.in
@@ -1,5 +1,8 @@
#! /bin/sh
+# Source function library.
+. /etc/init.d/functions
+
prefix=@prefix@
exec_prefix=@exec_prefix@
@@ -27,6 +30,10 @@ case "$1" in
$DAEMON -k
echo "."
;;
+ status)
+ status $DAEMON;
+ exit $?
+ ;;
restart|force-reload)
$0 stop
$0 start
@@ -34,7 +41,7 @@ case "$1" in
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
exit 1
;;
esac
|