From 77489e13408e3bbbb8c36735f359426078c3127d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 8 Oct 2003 23:12:46 +0000 Subject: init fix git-svn-id: file:///home/lennart/svn/public/aeswepd/trunk@14 022f378f-78c4-0310-b860-d162c87e6274 --- conf/waproamd.init.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/conf/waproamd.init.in b/conf/waproamd.init.in index ab77fa3..5f24431 100755 --- a/conf/waproamd.init.in +++ b/conf/waproamd.init.in @@ -27,10 +27,15 @@ if [ `id -u` != "0" ] && [ "$1" = "start" -o "$1" = "stop" ] ; then exit 1 fi -[ -n "$2" ] && INTERFACES="$2" - [ -f $CFG ] && . $CFG +VERB="$1" +shift + +[ "x$@" != "x"] && INTERFACES="$@" + +[ "x$INTERFACES" = "xauto" ] && INTERFACES="`cat /proc/net/dev | awk '{ print $1 }' | egrep '^wlan' | cut -d: -f1`" + case "$1" in start) echo -n "Starting Wireless Access Point Roaming Daemon:" @@ -56,9 +61,9 @@ case "$1" in done ;; force-reload|restart) - $0 stop + $0 stop $INTERFACES sleep 3 - $0 start + $0 start $INTERFACES ;; *) echo "Usage: $0 {start|stop|restart|force-reload|status}" -- cgit