WI-FI stuff ?

Andrew L. Gould algould at datawok.com
Tue Sep 30 09:41:04 PDT 2003


On Tuesday 30 September 2003 11:08 am, Frank Bonnet wrote:
> >Best of luck,
> >
> >Andrew Gould
>
> it's working ! ... except I cannot use DHCP for the moment to bootup the
> client
> but if I enter an IP address manually it works

Since I need various wifi configurations on my laptop, I use startup scripts 
in /usr/local/etc/rc.d.  They are turned off (that is, they don't end in 
'.sh') so that I can choose the configuration manually after bootup.

The text to /usr/local/etc/rc.d/wi0.dhcp.sh.off is below.  It assumes that the 
laptop is a client to an access point that uses WEP.  Replace the ssidname 
and wepkey in the start section.  Change 'wi0' to the interface device, if 
needed.  If you want it to start at bootup, rename the file without the 
'.off'.


#!/bin/sh
# /usr/local/etc/rc.d/wi0.dhcp.sh.off
# Configure wireless interface using DHCP

case $1 in 
start)
	ifconfig wi0 ssid "ssidname" authmode "shared" nwkey 0xaaaaaaaaaa
	dhclient wi0
	echo ' wi0'
	;;
stop)
	kill `cat /var/run/dhclient.pid`
	ifconfig wi0 remove
	echo ' wi0 removed'
	;;
status)
	ifconfig wi0
	;;
*)
	echo 'usage: /usr/local/etc/rc.d/wi0.dhcp.sh.off [start|stop|status]'
	;;
esac



More information about the freebsd-questions mailing list