From 06ed895f80cbf120c30383095654f94d51ad6f79 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 18 Feb 2008 20:04:33 +0000 Subject: [PATCH] * update cycle_wireless command --- cycle_wireless | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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}"; -- 2.39.5