Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #182: crashme.2

File crashme.2, 1.3 kB (added by anonymous, 14 years ago)
Line 
1 #! /bin/bash
2 #
3 # Warning: this script is likely to crash your system.
4 # The purpose is to demonstrate kernel panic due to bug in madwifi drivers
5
6 sync    ## we are expecting a crash;  protect disks somewhat
7
8 bindir=$( dirname $0 )
9
10 if test -z "$*" ; then
11   echo "Warning: this script is likely to crash your system."
12   echo "Usages:"
13   echo "        $0 0 1"
14   echo "        key=none essid=snark $0 1"
15 fi
16
17 ## zap old instances of the devices, if any:
18 >/dev/null 2>&1 wlanconfig ath0 destroy || true
19 >/dev/null 2>&1 wlanconfig ath1 destroy || true
20
21 for arg in $* ; do
22
23   case $arg in
24
25   0)  myessid=$essid
26       : ${myessid:=snark}
27       mykey=$key
28       if test "$mykey" != "none" ; then
29         mykey=$(cat /etc/network/$myessid.key 2>/dev/null || \
30           echo 99000000000000000000000000 )
31       fi
32       IFACE=ath0 wlanmode=ap \
33         key=$mykey essid=$myessid $bindir/wifi-up
34
35       ifconfig ath0 192.168.2.1
36   ;;
37
38   1)  myessid=$essid
39       : ${myessid:=MacNaughton}
40       mykey=$key
41       if test "$mykey" != "none" ; then
42         mykey=$(cat /etc/network/$myessid.key 2>/dev/null || \
43           echo 99111111111111111111111111 )
44       fi
45       IFACE=ath1 wlanmode="sta nosbeacon" \
46         key=$mykey essid=$myessid $bindir/wifi-up
47
48       ifconfig ath1 192.168.1.105
49       route add default gw 192.168.1.1
50   ;;
51
52   *)  1>&2 echo "Unrecognized verbiage '$arg'"
53       exit 1
54   ;;
55
56   esac
57
58 done