From 3f586e67e03505560767ca62652ba1550c73d2fd Mon Sep 17 00:00:00 2001 From: Adam Blackburn Date: Wed, 30 Dec 2009 10:06:39 -1000 Subject: [PATCH] update the Arch init script to use the -k switch --- in/init=arch=wicd.in | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/in/init=arch=wicd.in b/in/init=arch=wicd.in index fbfdb75..952e52d 100755 --- a/in/init=arch=wicd.in +++ b/in/init=arch=wicd.in @@ -5,7 +5,7 @@ . /etc/rc.conf . /etc/rc.d/functions -WICD_BIN=%SBIN%wicd +WICD_BIN="%SBIN%wicd" if [ -f /var/run/wicd/wicd.pid ]; then PID="$(cat /var/run/wicd/wicd.pid)" @@ -25,6 +25,17 @@ case "$1" in fi ;; stop) + stat_busy "Stopping wicd Daemon" + $WICD_BIN -k + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon wicd + stat_done + fi + ;; + + force_stop) stat_busy "Stopping wicd Daemon" [ ! -z "$PID" ] && kill $PID &> /dev/null if [ $? -gt 0 ]; then @@ -35,12 +46,12 @@ case "$1" in fi ;; restart) - $0 stop + $0 force_stop sleep 1 $0 start ;; *) - echo "usage: $0 {start|stop|restart}" + echo "usage: $0 {start|force_stop|stop|restart}" esac exit 0