wlan0 config questions
Walter Dnes
waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org
Tue Apr 13 04:38:08 UTC 2010
On Mon, Apr 12, 2010 at 08:09:40PM +0000, Anton Verevkin wrote
> Add
> config_wlan0=( null )
> to your /etc/conf.d/net file. This will disable dhcp on the
> interface. And even if wifi would connect to some network (I bet it
> wouldn't, but I am not sure), anyways, your interface would not get
> any IP and will stay safe until you manually configure it.
Thanks. that keeps things sane. Now let's start with simple stuff
first, manually connecting to an open access point at the public
library. Listed below are files /etc/conf.d/net, ~/bin/wi_open, and
/etc/wpa_supplicant.conf.open. Assuming that I have /etc/sudoers
properly set up, is ~/bin/wi_open the correct incantation? It copies
the appropriate config to /etc/wpa_supplicant.conf and then starts and
connects wifi. I plan to have multiple config files, to cover different
situations.
/etc/conf.d/net
===============
config_eth0="192.168.123.249 broadcast 192.168.123.255 netmask
255.255.255.248 mtu 1452"
routes_eth0=(
"default via 192.168.123.254 metric 2"
"192.168.123.248/29 via 192.168.123.254 metric 0"
)
modules=( "wpa_supplicant" )
config_wlan0=( "null" )
wpa_supplicant_wlan0="-Dwext"
wpa_timeout_wlan0=15
~/bin/wi_open
==============
#!/bin/bash
sudo /bin/cp /etc/wpa_supplicant.conf.open /etc/wpa_supplicant.conf
sudo /sbin/modprobe ath5k
sudo /etc/init.d/net.wlan0 restart
sudo /sbin/ifconfig wlan0 up
sudo /sbin/iwconfig wlan0 essid any channel auto
sudo /usr/sbin/wpa_supplicant -iwlan0
sudo /sbin/dhcpcd -C resolv.conf -C mtu wlan0
/etc/wpa_supplicant.conf.open
=============================
# Connect to an open AP
network={
ssid="public library"
key_mgmt=NONE
priority=9
}
network={
key_mgmt=NONE
priority=-9
}
--
Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org>
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list