From: Don Armstrong Date: Mon, 18 Feb 2008 20:04:33 +0000 (+0000) Subject: * update cycle_wireless command X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=06ed895f80cbf120c30383095654f94d51ad6f79;p=bin.git * update cycle_wireless command --- diff --git a/cycle_wireless b/cycle_wireless index 90b940e..7c6b350 100755 --- a/cycle_wireless +++ b/cycle_wireless @@ -25,8 +25,14 @@ fi; # Failure, so major cycle sudo ifdown wireless; -if [ "$WIRELESS" == "wireless" ]; then - sudo modprobe -r bcm43xx; - sudo modprobe bcm43xx; +if [ "$WIRELESS" == "wireless" ]; then + if lsmod|grep -q bcm43xx; then + sudo modprobe -r bcm43xx; + sudo modprobe bcm43xx; + else + sudo modprobe -r b43; + sudo modprobe b43; + fi; + sleep 2s; fi; sudo ifup "wireless=${NETWORK}";