mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 02:31:27 +00:00
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:
@@ -92,6 +92,10 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Stopping $DESC: "
|
echo -n "Stopping $DESC: "
|
||||||
|
if ! [ -f $PIDFILE ] ; then
|
||||||
|
echo "not running."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
start-stop-daemon --oknodo --stop --pidfile $PIDFILE \
|
start-stop-daemon --oknodo --stop --pidfile $PIDFILE \
|
||||||
--exec $DAEMON
|
--exec $DAEMON
|
||||||
restore_settings $SAVED_SETTINGS
|
restore_settings $SAVED_SETTINGS
|
||||||
|
|||||||
Reference in New Issue
Block a user