diff options
author | Liang Li <liang.li@windriver.com> | 2014-03-12 12:29:37 +0800 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2014-03-14 08:49:38 -0400 |
commit | 0d9adcd6576bff4d08a9d601a1296372020ec3a4 (patch) | |
tree | 5f196dd89e7c88a5220a068f1a3ee84187afd4ab /meta-networking/recipes-daemons/radvd/files | |
parent | 42da6554d80298a23d7ddab25ab02f2aa9696230 (diff) | |
download | meta-openembedded-0d9adcd6576bff4d08a9d601a1296372020ec3a4.tar.gz |
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@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
Diffstat (limited to 'meta-networking/recipes-daemons/radvd/files')
-rwxr-xr-x | meta-networking/recipes-daemons/radvd/files/radvd.init | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/radvd/files/radvd.init b/meta-networking/recipes-daemons/radvd/files/radvd.init index 921384cb0..529529293 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 | |||
92 | ;; | 92 | ;; |
93 | stop) | 93 | stop) |
94 | echo -n "Stopping $DESC: " | 94 | echo -n "Stopping $DESC: " |
95 | if ! [ -f $PIDFILE ] ; then | ||
96 | echo "not running." | ||
97 | exit 0 | ||
98 | fi | ||
95 | start-stop-daemon --oknodo --stop --pidfile $PIDFILE \ | 99 | start-stop-daemon --oknodo --stop --pidfile $PIDFILE \ |
96 | --exec $DAEMON | 100 | --exec $DAEMON |
97 | restore_settings $SAVED_SETTINGS | 101 | restore_settings $SAVED_SETTINGS |