[oe-commits] Liang Li : radvd: eliminate confusing warnings when stop service
git at git.openembedded.org
git at git.openembedded.org
Fri Mar 14 14:20:51 UTC 2014
Module: meta-openembedded.git
Branch: master
Commit: 0d9adcd6576bff4d08a9d601a1296372020ec3a4
URL: http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=0d9adcd6576bff4d08a9d601a1296372020ec3a4
Author: Liang Li <liang.li at windriver.com>
Date: Wed Mar 12 12:29:37 2014 +0800
radvd: eliminate confusing warnings when stop service
When run 'service radvd stop' in case radvd is not started/running,
we'll get warnings like this:
Stopping radvd: no /usr/sbin/radvd found; none killed
/etc/init.d/radvd: warning: cannot restore settings
radvd.
We could by pass these OPs by just check if the service is running
or not so eliminate possible warnings.
Signed-off-by: Liang Li <liang.li at windriver.com>
Signed-off-by: Joe MacDonald <joe at deserted.net>
---
meta-networking/recipes-daemons/radvd/files/radvd.init | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta-networking/recipes-daemons/radvd/files/radvd.init b/meta-networking/recipes-daemons/radvd/files/radvd.init
index 921384c..5295292 100755
--- a/meta-networking/recipes-daemons/radvd/files/radvd.init
+++ b/meta-networking/recipes-daemons/radvd/files/radvd.init
@@ -92,6 +92,10 @@ case "$1" in
;;
stop)
echo -n "Stopping $DESC: "
+ if ! [ -f $PIDFILE ] ; then
+ echo "not running."
+ exit 0
+ fi
start-stop-daemon --oknodo --stop --pidfile $PIDFILE \
--exec $DAEMON
restore_settings $SAVED_SETTINGS
More information about the Openembedded-commits
mailing list