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>
This commit is contained in:
Liang Li
2014-03-12 12:29:37 +08:00
committed by Joe MacDonald
parent 42da6554d8
commit 0d9adcd657
@@ -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