diff -Naur openap-ng-2002-11-07/files/etc/init.d/bridge openap-ct-2002-11-22/files/etc/init.d/bridge --- openap-ng-2002-11-07/files/etc/init.d/bridge Thu Jan 1 00:00:00 1970 +++ openap-ct-2002-11-22/files/etc/init.d/bridge Thu Nov 21 23:53:46 2002 @@ -0,0 +1,106 @@ +#!/bin/sh + + +EXITCODE=1 +case "$1" in + start) + echo "Starting BRIDGING services:" + + # fixme: move eth0 stuff to wired + ifconfig eth0 up + + # Ugh, no grep or cut... + #WLANS=`ifconfig -a | cut -d ' ' -f 1 | grep wlan` + #ETHS=`ifconfig -a | cut -d ' ' -f 1 | grep eth` + + brctl addbr br0 + brctl sethello br0 2 # must keep this below fd + # maxage - length of time between configuration messages + # (hellos) before a bridge decides that a port is no longer + # reachable. we'll set it to the time it takes an ap to + # reboot. the longer it is, the less we are affected by + # unnecessary spanning tree recalculations + brctl setmaxage br0 60 + brctl setfd br0 4 + # For compatibility with older, broken bridging on openap-0.1.1, + # set bridgeprio lower than 100 so that i can be root bridge + brctl setbridgeprio br0 90 + + # wlans must be first so the bridge takes the + # MAC address of the wlan + # No grep or cut (see above) so hardcode + #for i in $WLANS $ETHS ; do + # brctl addif br0 $i + #done + brctl addif br0 wlan0 + brctl addif br0 wlan0wds0 + brctl addif br0 wlan0wds1 + brctl addif br0 wlan0wds2 + brctl addif br0 wlan0wds3 + brctl addif br0 wlan0wds4 + brctl addif br0 wlan0wds5 + brctl addif br0 wlan0wds6 + brctl addif br0 wlan0wds7 + brctl addif br0 eth0 + + ifconfig br0 up + + # see if any packets received on eth0 interface + #ETH_PKTS=`grep eth0 /proc/net/dev| cut -d " " -f 5` + #if [ "$ETH_PKTS" -ne "0" ] ; then + # # if eth0 is active lower bridge priority + # # (we want the wired bridges to be root) + # echo "lowering bridge priority" + # brctl setbridgeprio br0 0 + #fi + + EXITCODE=0 + ;; + + stop) + echo "Shutting down BRIDGING services:" + + # Ugh, no grep or cut... + #WLANS=`brctl show | sed -n 's/.*\(wlan.*\).*/\1/p'` + #ETHS=`brctl show | sed -n 's/.*\(eth.*\).*/\1/p'` + + # teardown the bridge + ifconfig br0 down + + # No grep or cut (see above) so hardcode + #for i in $WLANS $ETHS ; do + # brctl delif br0 $i + #done + brctl delif br0 wlan0 + brctl delif br0 wlan0wds0 + brctl delif br0 wlan0wds1 + brctl delif br0 wlan0wds2 + brctl delif br0 wlan0wds3 + brctl delif br0 wlan0wds4 + brctl delif br0 wlan0wds5 + brctl delif br0 wlan0wds6 + brctl delif br0 wlan0wds7 + brctl delif br0 eth0 + + brctl delbr br0 + + EXITCODE=0 + ;; + + status) + echo "Checking BRIDGING service status:" + EXITCODE=0 + ;; + restart|reload) + echo "Restarting BRIDGING services:" + $0 stop + sleep 1 + $0 start + EXITCODE=$? + ;; + + *) + echo "Usage: $0 {start|stop|status|restart|reload}" + exit 1; + ;; +esac diff -Naur openap-ng-2002-11-07/files/etc/init.d/ethernet openap-ct-2002-11-22/files/etc/init.d/ethernet --- openap-ng-2002-11-07/files/etc/init.d/ethernet Thu Nov 21 23:48:37 2002 +++ openap-ct-2002-11-22/files/etc/init.d/ethernet Thu Jan 1 00:00:00 1970 @@ -1,52 +0,0 @@ -#! /bin/sh - -NAME="ethernet" -interface="eth0" - -set -e - -case "$1" in - start) - echo -n "Initializing $NAME: " - ifconfig lo 127.0.0.1 - . /etc/sysconfig/$interface - - # kill old udhcpc if any - if test -f /var/run/udhcpc-$interface.pid; then - kill -KILL `cat /var/run/udhcpc-$interface.pid` - rm -f /var/run/udhcpc-$interface.pid - fi - - if [ "$dhcp" = "enabled" ] ; then - /sbin/udhcpc -i $interface -p /var/run/udhcpc-$interface.pid - else - # run the dhcp interface config script manually - export broadcast netmask router domain dns interface ip - /usr/share/udhcpc/default.script bound - fi - - echo "Done." - ;; - stop) - echo -n "Stopping $NAME: " - - if test -f /var/run/udhcpc-$interface.pid; then - kill -KILL `cat /var/run/udhcpc-$interface.pid` - rm -f /var/run/udhcpc-$interface.pid - fi - /sbin/ifconfig $interface down - - echo "Done." - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "Usage: $0 {start|stop|restart}" >&2 - exit 1 - ;; -esac - -exit 0 diff -Naur openap-ng-2002-11-07/files/etc/init.d/tcpip.bridge openap-ct-2002-11-22/files/etc/init.d/tcpip.bridge --- openap-ng-2002-11-07/files/etc/init.d/tcpip.bridge Thu Jan 1 00:00:00 1970 +++ openap-ct-2002-11-22/files/etc/init.d/tcpip.bridge Thu Nov 21 23:53:46 2002 @@ -0,0 +1,44 @@ +#! /bin/sh + +NAME="tcpip" +interface="br0" + +set -e + +case "$1" in + start) + echo -n "Initializing $NAME: " + . /etc/sysconfig/$interface + if [ "$dhcp" = "enabled" ] ; then + /sbin/udhcpc -i $interface + else + # run the dhcp interface config script manually + export broadcast subnet router domain dns interface ip=$ipaddress + /usr/share/udhcpc/default.script bound + fi + + echo "Done." + ;; + stop) + echo -n "Stopping $NAME: " + . /etc/sysconfig/$interface + if [ "$dhcp" = "enabled" ] ; then + /usr/bin/killall -9 udhcpc + else + /sbin/ifconfig $interface down + fi + + echo "Done." + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff -Naur openap-ng-2002-11-07/files/etc/init.d/wireless openap-ct-2002-11-22/files/etc/init.d/wireless --- openap-ng-2002-11-07/files/etc/init.d/wireless Thu Nov 21 23:48:37 2002 +++ openap-ct-2002-11-22/files/etc/init.d/wireless Thu Nov 21 23:53:46 2002 @@ -1,25 +1,111 @@ #! /bin/sh NAME="wireless" -interface="wlan0" - -set -e +IFACE="wlan0" case "$1" in start) - echo -n "Initializing $NAME: " - cardmgr + echo -n "Starting $NAME: " + . /etc/sysconfig/$IFACE + + /sbin/cardmgr + # wait for the cardmgr to finish or no interface! + sleep 5 + + iwconfig $IFACE essid $SSID + iwconfig $IFACE channel $DSCHAN + + # Set hostap to use up to 8 WDS (ap-to-ap) links and to pre-create + # the interfaces. See hostap's README.prism2. + # Code 14=autom_ap_wds, 8=other_ap_policy, 27=wds_type + iwpriv wlan0 prism2_param 14 1 + iwpriv wlan0 prism2_param 8 1 + iwpriv wlan0 prism2_param 27 7 + iwpriv wlan0 wds_add 00:00:00:00:00:00 + iwpriv wlan0 wds_add 00:00:00:00:00:00 + iwpriv wlan0 wds_add 00:00:00:00:00:00 + iwpriv wlan0 wds_add 00:00:00:00:00:00 + iwpriv wlan0 wds_add 00:00:00:00:00:00 + iwpriv wlan0 wds_add 00:00:00:00:00:00 + iwpriv wlan0 wds_add 00:00:00:00:00:00 + iwpriv wlan0 wds_add 00:00:00:00:00:00 + + # No cut or grep, so have to hardcode. Would like to do this: + #WLANS=`ifconfig -a | cut -d ' ' -f 1 | grep wlan` + #for i in $WLANS ; do + # /sbin/ifconfig $i up + #done + /sbin/ifconfig wlan0 up + /sbin/ifconfig wlan0wds0 up + /sbin/ifconfig wlan0wds1 up + /sbin/ifconfig wlan0wds2 up + /sbin/ifconfig wlan0wds3 up + /sbin/ifconfig wlan0wds4 up + /sbin/ifconfig wlan0wds5 up + /sbin/ifconfig wlan0wds6 up + /sbin/ifconfig wlan0wds7 up + + # Set eth0 MAC address to be same as wlan0 MAC address for WL11000 + # FIX: this should somehow be moved int /etc/init.d/wired + # No sed so we do a horrible hack, would really like to do this: + #HARDADDR=`/sbin/ifconfig wlan0 | sed -n 's/.*HWaddr\(.*\)/\1/p'` + ifconfig wlan0 > /tmp/ifwlan0 + HARDADDR=`dd if=/tmp/ifwlan0 bs=1 skip=38 count=17` + rm /tmp/ifwlan0 + if [ -n "$HARDADDR" ] ; then +# # subtract 1 from byte 1 FIXME this is a hack +# BYTE1=`echo $HARDADDR | sed -n 's/[^:]*:\([0-9A-F]*\).*/\1/p'` +# BYTE1=`expr $BYTE1 - 1` +# HARDADDR=`echo $HARDADDR | sed -e "s/\(:[0-9A-F]*\)/:$BYTE1/"` + /sbin/ifconfig eth0 hw ether $HARDADDR + fi + echo "Done." ;; stop) echo -n "Stopping $NAME: " - killall cardmgr + + # remove from bridge + # No cut or grep, so have to hardcode. Would like to do this: + #WLANS=`brctl show | sed -n 's/.*\(wlan.*\).*/\1/p'` + #for i in $WLANS ; do + # /sbin/brctl delif br0 $i + #done + /sbin/brctl delif br0 wlan0 + /sbin/brctl delif br0 wlan0wds0 + /sbin/brctl delif br0 wlan0wds1 + /sbin/brctl delif br0 wlan0wds2 + /sbin/brctl delif br0 wlan0wds3 + /sbin/brctl delif br0 wlan0wds4 + /sbin/brctl delif br0 wlan0wds5 + /sbin/brctl delif br0 wlan0wds6 + /sbin/brctl delif br0 wlan0wds7 + + # tear down + # No cut or grep, so have to hardcode. Would like to do this: + #WLANS=`ifconfig | cut -d ' ' -f 1 | grep wlan` + #for i in $WLANS ; do + # /sbin/ifconfig $i down + #done + /sbin/ifconfig wlan0 down + /sbin/ifconfig wlan0wds0 down + /sbin/ifconfig wlan0wds1 down + /sbin/ifconfig wlan0wds2 down + /sbin/ifconfig wlan0wds3 down + /sbin/ifconfig wlan0wds4 down + /sbin/ifconfig wlan0wds5 down + /sbin/ifconfig wlan0wds6 down + /sbin/ifconfig wlan0wds7 down + + # remove modules + /usr/bin/killall -9 cardmgr + echo "Done." ;; restart) - $0 stop + /etc/init.d/$NAME stop sleep 1 - $0 start + /etc/init.d/$NAME start ;; *) echo "Usage: $0 {start|stop|restart}" >&2 diff -Naur openap-ng-2002-11-07/files/etc/pcmcia/hostap.conf openap-ct-2002-11-22/files/etc/pcmcia/hostap.conf --- openap-ng-2002-11-07/files/etc/pcmcia/hostap.conf Thu Nov 21 23:48:37 2002 +++ openap-ct-2002-11-22/files/etc/pcmcia/hostap.conf Thu Nov 21 23:53:46 2002 @@ -9,3 +9,17 @@ version "U.S. Robotics", "IEEE 802.11b PC-CARD" bind "hostap_cs" +card "Longshine LCR-8531 11Mbps WLAN PCMCIA CARD" + version "OEM", "PRISM2 IEEE 802.11 PC-Card", "Version 01.02" + manfid 0x0156, 0x0002 + bind "hostap_cs" + +card "SMC 2632W 11Mbps WLAN Card" + version "SMC", "SMC2632W", "Version 01.02" + bind "hostap_cs" + +card "Senao SL-2011CD/SL-2011CDPLUS" + version "INTERSIL", "HFA384x/IEEE", "Version 01.02" + manfid 0x0156, 0x0002 + bind "hostap_cs" + diff -Naur openap-ng-2002-11-07/files/etc/pcmcia/network openap-ct-2002-11-22/files/etc/pcmcia/network --- openap-ng-2002-11-07/files/etc/pcmcia/network Thu Nov 21 23:48:37 2002 +++ openap-ct-2002-11-22/files/etc/pcmcia/network Thu Nov 21 23:53:46 2002 @@ -7,8 +7,9 @@ case $action in start) - iwconfig $interface essid $SSID - iwconfig $interface channel $DSCHAN + # moved to init.d/wireless +# iwconfig $interface essid $SSID +# iwconfig $interface channel $DSCHAN # run the dhcp interface config script manually export broadcast netmask router domain dns interface ip diff -Naur openap-ng-2002-11-07/files/etc/sysconfig/br0 openap-ct-2002-11-22/files/etc/sysconfig/br0 --- openap-ng-2002-11-07/files/etc/sysconfig/br0 Thu Jan 1 00:00:00 1970 +++ openap-ct-2002-11-22/files/etc/sysconfig/br0 Thu Nov 21 23:53:46 2002 @@ -0,0 +1,3 @@ +# Configuration for bridge + +dhcp=enabled diff -Naur openap-ng-2002-11-07/files/etc/sysconfig/eth0 openap-ct-2002-11-22/files/etc/sysconfig/eth0 --- openap-ng-2002-11-07/files/etc/sysconfig/eth0 Thu Nov 21 23:48:37 2002 +++ openap-ct-2002-11-22/files/etc/sysconfig/eth0 Thu Jan 1 00:00:00 1970 @@ -1,3 +0,0 @@ -# Configuration for bridge - -dhcp=enabled diff -Naur openap-ng-2002-11-07/files/etc/sysconfig/wlan0 openap-ct-2002-11-22/files/etc/sysconfig/wlan0 --- openap-ng-2002-11-07/files/etc/sysconfig/wlan0 Thu Nov 21 23:48:37 2002 +++ openap-ct-2002-11-22/files/etc/sysconfig/wlan0 Thu Nov 21 23:53:46 2002 @@ -1,8 +1,4 @@ # wireless configuration SSID="Instant802_debug" -DSCHAN="11" - -ip="172.30.1.1" -netmask="255.255.0.0" -broadcast="172.30.255.255" +DSCHAN="1" diff -Naur openap-ng-2002-11-07/lists/files openap-ct-2002-11-22/lists/files --- openap-ng-2002-11-07/lists/files Thu Nov 21 23:48:37 2002 +++ openap-ct-2002-11-22/lists/files Fri Nov 22 00:14:50 2002 @@ -10,7 +10,8 @@ etc/group etc/host.conf etc/hosts -etc/init.d/ethernet +etc/init.d/tcpip.bridge +etc/init.d/bridge etc/init.d/wireless etc/inittab etc/passwd @@ -21,7 +22,7 @@ etc/protocols etc/rc etc/rc.sysinit -etc/sysconfig/eth0 +etc/sysconfig/br0 etc/sysconfig/wlan0 lib/modules/hostap.o lib/modules/hostap_crypt.o diff -Naur openap-ng-2002-11-07/lists/links openap-ct-2002-11-22/lists/links --- openap-ng-2002-11-07/lists/links Thu Nov 21 23:48:37 2002 +++ openap-ct-2002-11-22/lists/links Fri Nov 22 00:14:50 2002 @@ -37,10 +37,12 @@ bin/umount busybox bin/wget busybox etc/mtab ../proc/mounts -etc/rc1.d/K50ethernet ../init.d/ethernet -etc/rc1.d/K60wireless ../init.d/wireless -etc/rc3.d/S50ethernet ../init.d/ethernet -etc/rc3.d/S60wireless ../init.d/wireless +etc/rc1.d/K70wireless ../init.d/wireless +etc/rc1.d/K60bridge ../init.d/bridge +etc/rc1.d/K50tcpip.bridge ../init.d/tcpip.bridge +etc/rc3.d/S70tcpip.bridge ../init.d/tcpip.bridge +etc/rc3.d/S60bridge ../init.d/bridge +etc/rc3.d/S50wireless ../init.d/wireless etc/resolv.conf ../var/etc/resolv.conf lib/ld-uClibc.so.0 ../usr/lib/ld-uClibc.so.0 lib/modules/2.4.20-rc1 .