diff options
Diffstat (limited to 'conf/waproamd.init.in')
-rwxr-xr-x | conf/waproamd.init.in | 13 |
1 files 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}" |