summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/collectd
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2014-04-08 17:07:49 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-04-20 11:10:13 +0200
commitf0cde44d55c949efc7902268e44a3784ed0a53ec (patch)
tree265036014787097235255b19043db26d4028db5f /meta-oe/recipes-extended/collectd
parent438d363331b110c06554bda630e2a2a3f7ab1739 (diff)
downloadmeta-openembedded-f0cde44d55c949efc7902268e44a3784ed0a53ec.tar.gz
collectd: fix init status
Fix init status to get it works with 'service --status-all'. Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/collectd')
-rw-r--r--meta-oe/recipes-extended/collectd/collectd/collectd.init13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/collectd/collectd/collectd.init b/meta-oe/recipes-extended/collectd/collectd/collectd.init
index abdb194a3..95f5f73c6 100644
--- a/meta-oe/recipes-extended/collectd/collectd/collectd.init
+++ b/meta-oe/recipes-extended/collectd/collectd/collectd.init
@@ -146,6 +146,17 @@ d_stop() {
146 return "$rc" 146 return "$rc"
147} 147}
148 148
149# return:
150# 0 if the daemon is running
151# 3 if the daemon is stopped
152d_status(){
153 if test "$USE_COLLECTDMON" == 1; then
154 status $COLLECTDMON_DAEMON
155 else
156 status $DAEMON
157 fi
158}
159
149case "$1" in 160case "$1" in
150 start) 161 start)
151 echo -n "Starting $NAME" 162 echo -n "Starting $NAME"
@@ -164,7 +175,7 @@ case "$1" in
164 esac 175 esac
165 ;; 176 ;;
166 status) 177 status)
167 status_of_proc -p "$_PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $? 178 d_status
168 ;; 179 ;;
169 restart|force-reload) 180 restart|force-reload)
170 echo -n "Restarting $NAME" 181 echo -n "Restarting $NAME"