面倒くさがりな私は /etc/init.d/wireless_bridge にアクセスポイントになるための起動スクリプトを放り込みました。こんな感じです。
#!/bin/sh
# Begin /etc/init.d/
#
# Include the functions declared in the /etc/init.d/functions file
#
source /etc/init.d/functions
case "$1" in
start)
echo -n "Starting wireless bridge ..."
# wake up wired interface (internal)
ifconfig eth1 up
# wake up wireless modules
modprobe ath_pci
modprobe wlan_wep
# wake up sensor chip module (not related with wireless..)
modprobe vt1211
# wake up wireless interface and config
iwpriv ath0 mode 0 > /dev/null 2>&1
iwpriv ath0 hide_ssid 1 > /dev/null 2>&1
iwpriv ath0 wpa 0 > /dev/null 2>&1
ifconfig ath0 up
iwconfig ath0 mode master
iwconfig ath0 essid ESSID
iwconfig ath0 channel 46
iwconfig ath0 key open aaaa-bbbb-cccc-dddd-eeee-ffff-00
iwpriv ath1 mode 3 > /dev/null 2>&1
iwpriv ath1 hide_ssid 1 > /dev/null 2>&1
iwpriv ath1 wpa 0 > /dev/null 2>&1
ifconfig ath1 up
iwconfig ath1 mode master
iwconfig ath1 essid ESSID
iwconfig ath1 channel 12
iwconfig ath1 key open aaaa-bbbb-cccc-dddd-eeee-ffff-00
# make bridge
brctl addbr br0
brctl addif br0 eth1
brctl addif br0 ath0
brctl addif br0 ath1
# bridge config
ifconfig br0 up
ifconfig br0 inet xxx.yyy.zzz.aaa netmask 255.255.255.0
# start routing
echo "1" > /proc/sys/net/ipv4/ip_forward
;;
stop)
echo -n "Stopping wireless bridge ..."
ifconfig br0 down
brctl delbr br0
ifconfig eth1 down
ifconfig ath0 down
ifconfig ath1 down
;;
restart)
$0 stop
/usr/bin/sleep 1
$0 start
;;
status)
statusproc
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/
|
無線LANとはちょっと関係ないところも混じってますが気にしないように。
さて、一切の解説なしにメモ書きとして書いてみましたが、どこかの誰かの役に立てるのでしょうかねぇ・・
最終更新日: 2004/12/13 22:34:58