1 .TH WPA_ACTION "8" "26 May 2006" "" ""
3 wpa_action \- wpa_cli action script
5 \fBwpa_action\fR \fIIFACE ACTION\fR
7 \fBwpa_action\fR is a shell script designed to control the \fBifupdown\fR
8 framework according to \fIACTION\fR events received from \fBwpa_supplicant\fR.
9 \fBwpa_cli\fR receives \fICONNECTED\fR and \fIDISCONNECTED\fR events from
10 \fBwpa_supplicant\fR via the crtl_iface socket and gives the \fIACTION\fR event
11 to the \fBwpa_action\fR script as an argument, along with the \fIIFACE\fR to be
14 \fBwpa_action\fR also receives an environment variable from \fBwpa_cli\fR,
15 \fIWPA_ID_STR\fR, containing an alphanumeric identification string for the
16 \fICURRENT\fR network block. \fIWPA_ID_STR\fR is provided by the 'id_str'
17 network block option of \fBwpa_supplicant.conf\fR, and provides a means to map
18 the \fIACTION\fR to a \fILOGICAL\fR interface configured in the \fBinterfaces\fR
21 If either the ifupdown \fBinterfaces\fR or \fIifstate\fR file cannot be found,
22 \fBwpa_action\fR will exit silently (status 0). \fBwpa_action\fR will search
23 the following locations for their existance:
25 /etc/network/run/ifstate
26 /var/run/network/ifstate
27 /etc/network/interfaces
31 Network interface to be acted upon, for example 'eth1' or 'wlan0'.
33 An \fIACTION\fR to be performed on the \fIIFACE\fR.
36 \fBwpa_supplicant\fR has completed authentication.
37 \fBifup\fR \fIIFACE=WPA_ID_STR\fR is invoked and the action is logged to
38 syslog. Network settings for the \fILOGICAL\fR interface \fIWPA_ID_STR\fR
42 \fBwpa_supplicant\fR has detected disconnection.
43 \fBifdown\fR \fIIFACE=WPA_ID_STR\fR is invoked and the action is logged to
44 syslog. Network settings for the \fILOGICAL\fR interface \fIWPA_ID_STR\fR
48 The 'stop' \fIACTION\fR is a called manually by the user, to stop the
49 \fBwpa_cli\fR daemon, invoke \fBifdown\fR \fIIFACE\fR (if the \fIIFACE\fR is
50 present in the \fIifstate\fR file) and stop the \fBwpa_supplicant\fR daemon.
53 The 'reload' \fIACTION\fR can be used to reload the \fBwpa_supplicant\fR
54 configuration file specified by \fIwpa-roam\fR . 'restart' is a synonym
55 for 'reload' and can be used equally. The action is logged to
56 \fI/var/log/wpa_action.log\fR.
58 An alphanumeric identification string provided by the 'id_str' network block
59 option of \fBwpa_supplicant.conf\fR is exported to \fBwpa_action\fR as an
60 environment variable, \fIWPA_ID_STR\fR. When 'id_str' is not configured for the
61 \fICURRENT\fR network block, 'default' is substituted for the absent
62 \fIWPA_ID_STR\fR environment variable.
64 A unique network identifier, \fIWPA_ID\fR, is exported to \fBwpa_action\fR. It
65 is the number assigned to the \fICURRENT\fR \fBwpa_supplicant\fR network block
68 The only reasons for \fBwpa_action\fR to be explicitly executed by the user is
69 to stop \fBwpa_cli\fR from controlling \fBifupdown\fR or reload the
70 \fIwpa_supplicant.conf\fR file after editing.
73 \fBwpa_action\fR \fIeth1 stop\fR
76 Otherwise, \fBwpa_action\fR is given as an argument to a \fBwpa_cli\fR
80 \fBwpa_cli\fR \fI-i eth1 -a /sbin/wpa_action -B\fR
83 This can be done by using the \fIwpa-roam\fR option in the \fBinterfaces\fR
84 file. \fIwpa-roam\fR takes one argument, a user provided
85 \fBwpa_supplicant.conf\fR file.
87 The inet \fIMETHOD\fR must be 'manual' for this interface, as it will
88 be configured according to \fBwpa_cli\fR action events. Also supply a 'default'
89 \fBinterfaces\fR stanza using the dhcp inet \fIMETHOD\fR so that networks
90 without an 'id_str' option can fallback to attempting to receive an ip via
91 dhcp. If one or more networks requires additional network configuration,
92 provide an unique 'id_str' for each network, and an \fBinterfaces\fR stanza
93 using the 'id_str' value as a \fILOGICAL\fR interface. The following interfaces
94 file is configured to use dhcp for any network without an 'id_str', a static ip
95 for the network with an 'id_str' of 'home_static' and dhcp plus an additional
96 post-up command for the network with an 'id_str' of 'uni'.
98 An example wpa_supplicant.conf configured to roam between 3 different networks:
121 The corresponding \fBinterfaces\fR file would contain \fILOGICAL\fR interfaces,
122 that correlate to each unique 'id_str' provided by the configuration file:
126 iface eth1 inet manual
128 wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
130 iface default inet dhcp
134 iface home_static inet static
136 netmask 255.255.255.0
138 broadcast 192.168.0.255
144 \fBwpa_cli(8)\fR, \fBwpa_supplicant(8)\fR, \fBwpa_supplicant.conf(5)\fR,
145 \fBifup(8)\fR, \fBinterfaces(5)\fR
147 This manual page was written by Kel Modderman <kel@otaku42.de> for
148 the Debian GNU system (but may be used by others).