conn

A script repository to manage connections in Linux.
git clone git://r-36.net/conn
Log | Files | Refs | LICENSE

commit 2a26978dd9e4fbf750eb225e6dcef38371b93776
parent d446598072c23fe59b51adb38ad32e6b44955925
Author: Christoph Lohmann <20h@r-36.net>
Date:   Tue, 31 Jul 2012 16:20:39 +0200

Fixing the stopping of the wifi, which is now more cleanly.

Diffstat:
etc/conn/common.sh | 3+--
examples/wifi/run.sh | 2+-
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/etc/conn/common.sh b/etc/conn/common.sh @@ -122,10 +122,9 @@ stopwpa() { pkill -KILL -f "$WPACLICMD -i $1 -a $WIFIDIR/$1-action.sh -B" } -# $WPA_ID must be set from within the calling action script. getssid() { $WPACLIREQ -i $1 list_networks \ - | awk -F'\t' "/^$WPA_ID/ {print \$2}" + | awk -F'\t' "/\[CURRENT\]$/ {print \$2}" } ## DHCP handling diff --git a/examples/wifi/run.sh b/examples/wifi/run.sh @@ -28,11 +28,11 @@ case "$1" in exit $? ;; -k) - stopwpa $interface if [ -x "$WIFIDIR/$interface-action.sh" ]; then $WIFIDIR/$interface-action.sh $interface DISCONNECTED fi + stopwpa $interface islinkup $interface && setlinkdown $interface