[procps] vm.min_free_kbytes is removed in sysctl.conf"
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-connectivity / wpa-supplicant / wpa-supplicant-0.7.3 / wpa_action.8
1 .TH WPA_ACTION "8" "26 May 2006" "" ""
2 .SH NAME
3 wpa_action \- wpa_cli action script
4 .SH SYNOPSIS
5 \fBwpa_action\fR \fIIFACE ACTION\fR
6 .SH "DESCRIPTION"
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
12 acted upon.
13 .PP
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
19 file.
20 .PP
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:
24 .nf
25         /etc/network/run/ifstate
26         /var/run/network/ifstate
27         /etc/network/interfaces
28 .fi
29 .PP
30 .SH IFACE
31 Network interface to be acted upon, for example 'eth1' or 'wlan0'.
32 .SH ACTION
33 An \fIACTION\fR to be performed on the \fIIFACE\fR.
34 .TP
35 \fBCONNECTED\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
39 are applied.
40 .TP
41 \fBDISCONNECTED\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
45 are undone.
46 .TP
47 \fBstop\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.
51 .TP
52 \fBreload\fR
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.
57 .SH ENVIRONMENT
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.
63 .PP
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
66 (network_id).
67 .SH USAGE
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.
71 .PP
72 .RS
73 \fBwpa_action\fR \fIeth1 stop\fR
74 .RE
75 .PP
76 Otherwise, \fBwpa_action\fR is given as an argument to a \fBwpa_cli\fR
77 daemon.
78 .PP
79 .RS
80 \fBwpa_cli\fR \fI-i eth1 -a /sbin/wpa_action -B\fR
81 .RE
82 .PP
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. 
86 .PP
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'.
97 .PP
98 An example wpa_supplicant.conf configured to roam between 3 different networks:
99 .PP
100 .RS
101 .nf
102 network={
103         ssid="foo"
104         id_str="uni"
105         key_mgmt=NONE
106 }
107
108 network={
109         ssid="bar"
110         id_str="home_static"
111         psk=123456789...
112 }
113
114 network={
115         ssid=""
116         key_mgmt=NONE
117 }
118 .fi
119 .RE
120 .PP
121 The corresponding \fBinterfaces\fR file would contain \fILOGICAL\fR interfaces,
122 that correlate to each unique 'id_str' provided by the configuration file:
123 .PP
124 .RS
125 .nf
126 iface eth1 inet manual
127         wpa-driver wext
128         wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
129
130 iface default inet dhcp
131
132 iface uni inet dhcp
133
134 iface home_static inet static
135         address 192.168.0.20
136         netmask 255.255.255.0
137         network 192.168.0.0
138         broadcast 192.168.0.255
139         gateway 192.168.0.1
140 .fi
141 .RE
142 .PP
143 .SH SEE ALSO
144 \fBwpa_cli(8)\fR, \fBwpa_supplicant(8)\fR, \fBwpa_supplicant.conf(5)\fR,
145 \fBifup(8)\fR, \fBinterfaces(5)\fR
146 .SH AUTHOR
147 This manual page was written by Kel Modderman <kel@otaku42.de> for
148 the Debian GNU system (but may be used by others).