Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2003 11:41:01 -0500
From:      "Andrew L. Gould" <algould@datawok.com>
To:        Frank Bonnet <f.bonnet@esiee.fr>
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: WI-FI stuff ?
Message-ID:  <200309301141.01838.algould@datawok.com>
In-Reply-To: <3F79AA6D.2080006@esiee.fr>
References:  <20030930110349.A14431@bart.esiee.fr> <200309300737.47020.algould@datawok.com> <3F79AA6D.2080006@esiee.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309301141.01838.algould>