collected: (#2010)
[openwrt/svn-archive/archive.git] / net / click / patches / 200-roofnet_fix.patch
1 diff -urN click-cvs.2006.03.02.old/conf/wifi/gen_config_roofnet.sh click-cvs.2006.03.02/conf/wifi/gen_config_roofnet.sh
2 --- click-cvs.2006.03.02.old/conf/wifi/gen_config_roofnet.sh 2007-05-12 09:12:48.346397229 +0100
3 +++ click-cvs.2006.03.02/conf/wifi/gen_config_roofnet.sh 2007-05-12 10:00:52.579345023 +0100
4 @@ -12,7 +12,7 @@
5 fi
6
7
8 -mac=$(/sbin/ifconfig ath0 | sed -n 's/^.*HWaddr \([0-9A-Za-z:]*\).*/\1/p')
9 +mac=$(/sbin/ifconfig wifi0 | sed -n 's/^.*HWaddr \([0-9A-Za-z-]*\).*/\1/p'| sed 's/-/:/g' | cut -c -17)
10 # extract the bottom three octects to use as IP
11
12 hi_hex=$(echo $mac | sed -n 's/.*:.*:.*:\([0-9A-Za-z:]*\):.*:.*.*/\1/p')
13 @@ -23,7 +23,7 @@
14 mid="0x$mid_hex";
15 lo="0x$lo_hex";
16
17 -SUFFIX=$(printf "%d.%d.%d" $hi $mid $lo)
18 +SUFFIX=$(printf "%d.%d.%d" $((hi)) $((mid)) $((lo)))
19 WIRELESS_MAC=$mac
20 SRCR_IP="5.$SUFFIX"
21 SRCR_NM="255.0.0.0"
22 @@ -40,7 +40,7 @@
23 /sbin/ifconfig $DEV txqueuelen 5
24 /sbin/ifconfig $DEV up
25 echo '804' > /proc/sys/net/$DEV/dev_type
26 -/sbin/modprobe tun > /dev/null 2>&1
27 +/sbin/insmod tun > /dev/null 2>&1
28
29 MODE="g"
30 PROBES="2 60 2 1500 4 1500 11 1500 22 1500"