[oe] [meta-networking][PATCH] radvd: eliminate confusing warnings when stop service
Liang Li
liang.li at windriver.com
Wed Mar 12 04:29:37 UTC 2014
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>
---
recipes-daemons/radvd/files/radvd.init | 4 ++++
1 个文件被修改,插入 4 行(+)
diff --git a/recipes-daemons/radvd/files/radvd.init b/recipes-daemons/radvd/files/radvd.init
index 921384c..5295292 100755
--- a/recipes-daemons/radvd/files/radvd.init
+++ b/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
--
1.7.11.4
More information about the Openembedded-devel
mailing list