Remove support for Linux kernels older than 2.6.13
[madwifi/.git] / scripts / madwifi-unload
index 5f033bfb3ff28d8bdeca2f65d43d30b688136e75..a46c1bb8a735e3cbe5be6b475884a1278b1a28ac 100755 (executable)
@@ -3,7 +3,7 @@
 : ${PATTERN='\(ath_.*\|wlan_.*\|wlan\)$'}
 : ${MAX_TRIES=10}
 
-test "`id -u`" = 0 || {
+test "$(id -u)" = 0 || {
        echo "ERROR: You must be root to run this script" >&2
        exit 1
 }
@@ -18,7 +18,7 @@ while test "$tries" != "0"; do
        skipped=0
        IFS='
 '
-       for line in `cat /proc/modules`; do
+       for line in $(cat /proc/modules); do
                IFS='   '
                set x $line
                name="$2"
@@ -28,9 +28,6 @@ while test "$tries" != "0"; do
                state="$6"
                expr "$name" : "$PATTERN" >/dev/null || continue
 
-               # Compatibility for Linux 2.4.x
-               test -z "$state" && { use_name="-"; state="Live"; }
-
                if test "$state" != "Live" || test "$use_count" != "0" || \
                   test "$use_name" != "-"; then
                        # Don't skip unload in the last run