Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] wpa_supplicant structure....was: wpa_supplicant init script

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Pieter Lenaerts <e-type AT sourcemage.org>
  • To: "sm-discuss AT lists.ibiblio.org" <sm-discuss AT lists.ibiblio.org>
  • Subject: Re: [SM-Discuss] wpa_supplicant structure....was: wpa_supplicant init script
  • Date: Mon, 15 May 2006 12:27:35 +0200

Op ma, 15-05-2006 te 12:59 +0300, schreef Juuso Alasuutari:
> It launches a wpa_supplicant daemon that opens a global control interface
> (default is /var/run/wpa_supplicant-global). wpa_supplicant can then be
> controlled via wpa_cli. Users that belong to the group defined
> in /etc/wpa_ctrl.conf have wpa_cli access. Network interface, device
> driver,
> control interface and config file are defined
> in /etc/sysconfig/wpa_supplicant.

my tactics:
I have a fully configured wpa_supplicant.conf, which includes the
ctrl_group stuff iuso has but also defines all my networks (see
attachments), so upon running wpa_supplicant, it will associate to the
highest priority known network.

next, there's wpa_cli that can be run with an action script. if wpa_cli
receives a disconnect/connect event, it will run the script with
interface name and event name as arguments. what the script does is:
check if it's a connect event or a disconnect event, check the ssid
wpa_supplicant is connected to and call dhcpcd or set network settings
manually.

right now, my script is UGLY! all vars are hardcoded. a solution would
be this: have an /etc/wpa_supplicant folder holding all wpa_supplicant
config files + a config file for every ssid. on a connect event, the
action script sources the ssid config file and sets connection options.

so, this would be our (optional) structure:
1. iuso's init script, with additions to run wpa_cli with action script
and reassociation command to make sure we get an event.
2. an /etc/wpa_supplicant/wpa_supplicant.conf file, holding config and
network association options for wpa_supplicant
3. a series of /etc/wpa_supplicant/<ssid> files, holding variables for
each ssid configured in wpa_supplicant.conf (these would resemble our
current netconf generated files)
4. an action script in /etc/wpa_supplicant.conf that sources the ssid
files and gets the interface up (or down on a disconnect event)

we need more thoughts ;)

--
Pieter Lenaerts
Source Mage GNU/Linux

http://www.sourcemage.org
"Linux so advanced it may well be magic"

Attachment: action_script.sh
Description: application/shellscript

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=users
network={
ssid="e-wireless"
key_mgmt=NONE
wep_key0=**************
wep_tx_keyidx=0
priority=5
auth_alg=SHARED
}
network={
ssid="default"
key_mgmt=NONE
}
network={
ssid="fluppe"
key_mgmt=NONE
wep_key0=**************
wep_tx_keyidx=0
priority=5
auth_alg=SHARED
}
network={
ssid="UA-aes"
scan_ssid=1
key_mgmt=WPA-EAP
eap=PEAP
identity="my username"
password="my pass"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}
network={
ssid="UA-tkip"
scan_ssid=1
key_mgmt=WPA-EAP
eap=PEAP
identity="that same username"
password="that same pass"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}

Attachment: signature.asc
Description: Dit berichtdeel is digitaal ondertekend




Archive powered by MHonArc 2.6.24.

Top of Page