/[vps]/baselayout-vserver/trunk/etc/conf.d/wireless.example
Gentoo

Contents of /baselayout-vserver/trunk/etc/conf.d/wireless.example

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download)
Sat Sep 3 16:10:27 2005 UTC (8 years, 11 months ago) by hollow
File size: 11565 byte(s)
import initial baselayout sources (1.12.0_pre8)
1 # /etc/conf.d/wireless:
2 # Global wireless config file for net.* rc-scripts
3
4 ##############################################################################
5 # IMPORTANT
6 # linux-wlan-ng is not supported as they have their own configuration program
7 # ensure that /etc/conf.d/net has the entry "!iwconfig" in it's modules line
8 # Try and use an alternative driver if you need to use this - hostap-driver
9 # supports non-usb linux-wlan-ng driven devices
10 ##############################################################################
11
12 ##############################################################################
13 # HINTS
14 ##############################################################################
15 # Remember to change eth0 to your wireless interface which may be
16 # eth0, eth1, wlan0, ath0 - you get the idea. If you're not sure
17 # you can type "iwconfig" at the command prompt and it will tell you which
18 # interfaces are wireless.
19 # Say that your wireless interface is ath0 - the line
20 # #essid_eth0="any"
21 # becomes
22 # #essid_ath0="any"
23 #
24 # Remember to change ESSID to your ESSID.
25 # Say that your ESSID is My NET - the line
26 # #key_ESSID="s:passkey"
27 # becomes
28 # #key_My_NET="s:passkey"
29 # Notice that the space has changed to an underscore - do the same with all
30 # characters not in a-z A-Z (english alphabet) 0-9. This only applies to
31 # variables and not values.
32 #
33 # Any ESSID's in values like essid_eth0="My NET" may need to be escaped
34 # This means placing the character \ before the character
35 # \" need to be escaped for example
36 # So if your ESSID is
37 # My "\ NET
38 # it becomes
39 # My \"\\ NET
40 # for example
41 # #essid_eth0="My\"\\NET"
42 #
43 # So using the above we can use
44 # #dns_domain_My____NET="My\"\\NET"
45 # which is an invalid dns domain, but shows the how to use the variable
46 # structure
47 #
48 # As a final note, most users will just need to set the following options
49 # key_ESSID1="s:yourkeyhere enc open" # s: means a text key
50 # key_ESSID2="aaaa-bbbb-cccc-dd" # no s: means a hex key
51 # preferred_aps=( "ESSID1" "ESSID2" )
52 #
53 # Clear? Good. Now configure your wireless network below
54 #########################################################
55
56 ##############################################################################
57 # SETTINGS
58 ##############################################################################
59 # Hard code an ESSID to an interface - leave this unset if you wish the driver
60 # to scan for available Access Points
61 # Set to "any" to connect to any ESSID - the driver picks an Access Point
62 # This needs to be done when the driver doesn't support scanning
63 # This may work for drivers that don't support scanning but you need automatic
64 # AP association
65 # I would only set this as a last resort really - use the preferred_aps
66 # setting at the bottom of this file
67
68 # However, using ad-hoc (without scanning for APs) and master mode
69 # do require the ESSID to be set - do this here
70 #essid_eth0="any"
71
72 # Set the mode of the interface (managed, ad-hoc, master or auto)
73 # The default is auto
74 # If it's ad-hoc or master you also may need to specify the channel below
75 #mode_eth0="auto"
76
77 # If managed mode fails, drop to ad-hoc mode with the below ESSID?
78 #adhoc_essid_eth0="WLAN"
79
80 #Channel can be set (1-14), but defaults to 3 if not set.
81 #
82 # The below is taken verbatim from the BSD wavelan documentation found at
83 # http://www.netbsd.org/Documentation/network/wavelan.html
84 # There are 14 channels possible; We are told that channels 1-11 are legal for
85 # North America, channels 1-13 for most of Europe, channels 10-13 for France,
86 # and only channel 14 for Japan. If in doubt, please refer to the documentation
87 # that came with your card or access point. Make sure that the channel you
88 # select is the same channel your access point (or the other card in an ad-hoc
89 # network) is on. The default for cards sold in North America and most of Europe
90 # is 3; the default for cards sold in France is 11, and the default for cards
91 # sold in Japan is 14.
92 #channel_eth0="3"
93
94 # Setup any other config commands. This is basically the iwconfig argument
95 # without the iwconfig $iface
96 #iwconfig_eth0=""
97
98 # Set private driver ioctls. This is basically the iwpriv argument without
99 # the iwpriv $iface
100 #iwpriv_eth0=""
101
102 # Seconds to wait before scanning
103 # Some drivers need to wait until they have finished "loading"
104 # before they can scan - otherwise they error and claim that they cannot scan
105 # or resource is unavailable. The default is to wait zero seconds
106 #sleep_scan_eth0="1"
107
108 # Seconds to wait until associated. The default is to wait 10 seconds.
109 # 0 means wait indefinitely. WARNING : this can cause an infinite delay when
110 # booting.
111 #associate_timeout_eth0="5"
112
113 # By default a successful association in Managed mode sets the MAC
114 # address of the AP connected to. However, some drivers (namely
115 # the ipw2100) don't set an invalid MAC address when association
116 # fails - so we need to check on link quality which some drivers
117 # don't report properly either.
118 # So if you have connection problems try flipping this setting
119 # Valid options are MAC, quality and all - defaults to MAC
120 #associate_test_eth0="MAC"
121
122 # Some driver/card combinations need to scan in Ad-Hoc mode
123 # After scanning, the mode is reset to the one defined above
124 #scan_mode_eth0="Ad-Hoc"
125
126 # Below you can define private ioctls to run before and after scanning
127 # Format is the same as the iwpriv_eth0 above
128 # This is needed for the HostAP drivers
129 #iwpriv_scan_pre_eth0="host_roaming 2"
130 #iwpriv_scan_post_eth0="host_roaming 0"
131
132 # Define a WEP key per ESSID or MAC address (of the AP, not your card)
133 # The encryption type (open or restricted) must match the
134 # encryption type on the Access Point
135 # You can't use "any" for an ESSID here
136 #key_ESSID="1234-1234-1234-1234-1234-1234-56"
137 # or you can use strings. Passphrase IS NOT supported
138 # To use a string, prefix it with s:
139 # Note - this example also sets the encryption method to open
140 # which is regarded as more secure than restricted
141 #key_ESSID="s:foobar enc open"
142 #key_ESSID="s:foobar enc restricted"
143
144 # If you have whitespace in your key, here's how to set it and use other
145 # commands like using open encryption.
146 #key_ESSID="s:'foo bar' enc open"
147
148 # WEP key for the AP with MAC address 001122334455
149 #key_001122334455="s:foobar"
150
151 # Here are some more examples of keys as some users find others work
152 # and some don't where they should all do the same thing
153 #key_ESSID="open s:foobar"
154 #key_ESSID="open 1234-5678-9012"
155 #key_ESSID="s:foobar enc open"
156 #key_ESSID="1234-5678-9012 enc open"
157
158 # You may want to set muliple keys - here's an example
159 # It sets 4 keys on the card and instructs to use key 2 by default
160 #key_ESSID="[1] s:passkey1 key [2] s:passkey2 key [3] s:passkey3 key [4] s:passkey4 key [2]"
161
162 # You can also override the interface settings found in /etc/conf.d/net
163 # per ESSID - which is very handy if you use different networks a lot
164 #config_ESSID=( "dhcp" )
165 #dhcpcd_ESSID="-t 5"
166 #routes_ESSID=()
167 #fallback_ESSID=()
168
169 # Setting name/domain server causes /etc/resolv.conf to be overwritten
170 # Note that if DHCP is used, and you want this to take precedence then
171 # please put -R in your dhcpcd options
172 #dns_servers_ESSID=( "192.168.0.1" "192.168.0.2" )
173 #dns_domain_ESSID="some.domain"
174 #dns_search_path_ESSID="search.this.domain search.that.domain"
175 # Please check the man page for resolv.conf for more information
176 # as domain and search (searchdomains) are mutually exclusive and
177 # searchdomains takes precedence
178
179 # You can also set any of the /etc/conf.d/net variables per MAC address
180 # incase you use Access Points with the same ESSID but need different
181 # networking configs. Below is an example - of course you use the same
182 # method with other variables
183 #config_001122334455=( "dhcp" )
184 #dhcpcd_001122334455="-t 10"
185 #dns_servers_001122334455=( "192.168.0.1" "192.168.0.2" )
186
187 # Map a MAC address to an ESSID
188 # This is used when the Access Point is not broadcasting it's ESSID
189 # WARNING: This will override the ESSID being broadcast due to some
190 # Access Points sending an ESSID even when they have been configured
191 # not too!
192 # Change 001122334455 to the MAC address and ESSID to the ESSID
193 # it should map to
194 #essid_001122334455="ESSID"
195
196 # This lists the preferred ESSIDs to connect to in order
197 # ESSID's can contain any characters here as they must match the broadcast
198 # ESSID exactly.
199 # Surround each ESSID with the " character and seperate them with a space
200 # If the first ESSID isn't found then it moves onto the next
201 # If this isn't defined then it connects to the first one found
202 #preferred_aps=( "ESSID 1" "ESSID 2" )
203
204 # You can also define a preferred_aps list per interface
205 #preferred_aps_eth0=( "ESSID 3" "ESSID 4" )
206
207 # You can also say whether we only connect to preferred APs or not
208 # Values are "any", "preferredonly", "forcepreferred", "forcepreferredonly" and "forceany"
209 # "any" means it will connect to visible APs in the preferred list and then any
210 # other available AP
211 # "preferredonly" means it will only connect to visible APs in the preferred list
212 # "forcepreferred" means it will forceably connect to APs in order if it does not find
213 # them in a scan
214 # "forcepreferredonly" means it forceably connects to the APs in order and does not bother
215 # to scan
216 # "forceany" does the same as forcepreferred + connects to any other available AP
217 # Default is "any"
218 #associate_order="any"
219 #associate_order_eth0="any"
220
221 # You can define blacklisted Access Points in the same way
222 #blacklist_aps=( "ESSID 1" "ESSID 2" )
223 #blacklist_aps_eth0=( "ESSID 3" ESSID 4" )
224
225 # If you have more than one wireless card, you can say if you want
226 # to allow each card to associate with the same Access Point or not
227 # Values are "yes" and "no"
228 # Default is "yes"
229 #unique_ap="yes"
230 #unique_ap_eth0="yes"
231
232 # IMPORTANT: preferred_only, blacklisted_aps and unique_ap only work when
233 # essid_eth0 is not set and your card is capable of scanning
234
235 # NOTE: preferred_aps list ignores blacklisted_aps - so if you have
236 # the same ESSID in both, well, you're a bit silly :p
237
238
239 ##############################################################################
240 # ADVANCED CONFIGURATION
241 #
242 # Two functions can be defined which will be called surrounding the
243 # associate function. The functions are called with the interface
244 # name first so that one function can control multiple adapters.
245 #
246 # The return values for the preassociate function should be 0
247 # (success) to indicate that configuration or deconfiguration of the
248 # interface can continue. If preassociate returns a non-zero value, then
249 # interface configuration will be aborted.
250 #
251 # The return value for the postassociate function is ignored
252 # since there's nothing to do if it indicates failure.
253
254 #preassociate() {
255 # # The below adds two configuration variables leap_user_ESSID
256 # # and leap_pass_ESSID. When they are both confiugred for the ESSID
257 # # being connected to then we run the CISCO LEAP script
258 #
259 # local user pass
260 # eval user=\"\$\{leap_user_${ESSIDVAR}\}\"
261 # eval pass=\"\$\{leap_pass_${ESSIDVAR}\}\"
262 #
263 # if [[ -n ${user} && -n ${pass} ]]; then
264 # if [[ ! -x /opt/cisco/bin/leapscript ]]; then
265 # eend "For LEAP support, please emerge net-misc/cisco-aironet-client-utils"
266 # return 1
267 # fi
268 # einfo "Waiting for LEAP Authentication on \"${ESSID//\\\\//}\""
269 # if /opt/cisco/bin/leapscript ${user} ${pass} | grep -q 'Login incorrect'; then
270 # ewarn "Login Failed for ${user}"
271 # return 1
272 # fi
273 # fi
274 #
275 # return 0
276 #}
277
278 #postassociate() {
279 # # This function is mostly here for completeness... I haven't
280 # # thought of anything nifty to do with it yet ;-)
281 # # Return 0 always
282 # return 0
283 #}

  ViewVC Help
Powered by ViewVC 1.1.20