Patchwork [1/2] distcc: add init.d/distcc status command for LSB compliance

login
register
mail settings
Submitter rongqing.li@windriver.com
Date Sept. 3, 2013, 5:19 a.m.
Message ID <57af6c0254630ff3b483a1f58366af931b5e9d12.1378185423.git.rongqing.li@windriver.com>
Download mbox | patch
Permalink /patch/57255/
State Accepted
Commit ab9694411840a9a78e9b6bbd24ef497be9f042b9
Headers show

Comments

rongqing.li@windriver.com - Sept. 3, 2013, 5:19 a.m.
From: "Roy.Li" <rongqing.li@windriver.com>

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
 meta/recipes-devtools/distcc/files/distcc |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-devtools/distcc/files/distcc b/meta/recipes-devtools/distcc/files/distcc
index 513bc48..c7c414d 100755
--- a/meta/recipes-devtools/distcc/files/distcc
+++ b/meta/recipes-devtools/distcc/files/distcc
@@ -35,6 +35,9 @@  test -x $DAEMON || exit 0
 
 set -e
 
+# Source function library.
+. /etc/init.d/functions
+
 # construct access list
 ALLOW=""
 for net in $ALLOWEDNETS
@@ -94,9 +97,14 @@  case "$1" in
 	}
 	echo "."
 	;;
+
+   status)
+	status $DAEMON
+	exit $?
+	;;
   *)
 	N=/etc/init.d/$NAME
-	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
 	exit 1
 	;;
 esac