/[baselayout]/trunk/conf.d.BSD/wireless.example
Gentoo

Contents of /trunk/conf.d.BSD/wireless.example

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2547 - (show annotations) (download)
Thu Apr 5 11:18:42 2007 UTC (7 years, 4 months ago) by uberlord
File size: 7596 byte(s)
    Rewrite the core parts in C. We now provide librc so other programs can
    query runlevels, services and state without using bash. We also provide
    libeinfo so other programs can easily use our informational functions.

    As such, we have dropped the requirement of using bash as the init script
    shell. We now use /bin/sh and have strived to make the scripts as portable
    as possible. Shells that work are bash and dash. busybox works provided
    you disable s-s-d. If you have WIPE_TMP set to yes in conf.d/bootmisc you
    should disable find too.
    zsh and ksh do not work at this time.

    Networking support is currently being re-vamped also as it was heavily bash
    array based. As such, a new config format is available like so
    config_eth0="1.2.3.4/24 5.6.7.8/16"
    or like so
    config_eth0="'1.2.3.4 netmask 255.255.255.0' '5.6.7.8 netmask 255.255.0.0'"

    We will still support the old bash array format provided that /bin/sh IS
    a link it bash.

    ChangeLog for baselayout-1 can be found in our SVN repo.
1 # /etc/conf.d/wireless:
2 # Global wireless config file for net.* rc-scripts
3
4 ##############################################################################
5 # HINTS
6 ##############################################################################
7 # see net.example for using ESSID in variable names
8 #
9 # Most users will just need to set the following options
10 # key_ESSID1="s:yourkeyhere enc open" # s: means a text key
11 # key_ESSID2="aaaa-bbbb-cccc-dd" # no s: means a hex key
12 # preferred_aps="'ESSID1' 'ESSID2'"
13 #
14 # Clear? Good. Now configure your wireless network below
15 #############################################################################
16
17 ##############################################################################
18 # SETTINGS
19 ##############################################################################
20 # Hard code an ESSID to an interface - leave this unset if you wish the driver
21 # to scan for available Access Points
22 # I would only set this as a last resort really - use the preferred_aps
23 # setting at the bottom of this file
24 #essid_eth0='foo'
25
26 # Some drivers/hardware don't scan all that well. We have no control over this
27 # but we can say how many scans we want to do to try and get a better sweep of
28 # the area. The default is 1.
29 #scans_eth0="1"
30
31 #Channel can be set (1-14), but defaults to 3 if not set.
32 #
33 # The below is taken verbatim from the BSD wavelan documentation found at
34 # http://www.netbsd.org/Documentation/network/wavelan.html
35 # There are 14 channels possible; We are told that channels 1-11 are legal for
36 # North America, channels 1-13 for most of Europe, channels 10-13 for France,
37 # and only channel 14 for Japan. If in doubt, please refer to the documentation
38 # that came with your card or access point. Make sure that the channel you
39 # select is the same channel your access point (or the other card in an ad-hoc
40 # network) is on. The default for cards sold in North America and most of Europe
41 # is 3; the default for cards sold in France is 11, and the default for cards
42 # sold in Japan is 14.
43 #channel_eth0="3"
44
45 # Setup any other config commands. This is basically the ifconfig argument
46 # without the ifconfig $iface.
47 #ifconfig_eth0=""
48 # You can do the same per ESSID too.
49 #ifconfig_ESSID=""
50
51 # Seconds to wait until associated. The default is to wait 10 seconds.
52 # 0 means wait indefinitely. WARNING: this can cause an infinite delay when
53 # booting.
54 #associate_timeout_eth0="5"
55
56 # Define a WEP key per ESSID or MAC address (of the AP, not your card)
57 # The encryption type (open or restricted) must match the
58 # encryption type on the Access Point.
59 # To set a hex key, prefix with 0x
60 #key_ESSID="0x12341234123412341234123456"
61 # or you can use strings. Passphrase IS NOT supported
62 #key_ESSID="foobar"
63 #key_ESSID="foobar"
64
65 # WEP key for the AP with MAC address 001122334455
66 #mac_key_001122334455="foobar"
67
68 # You can also override the interface settings found in /etc/conf.d/net
69 # per ESSID - which is very handy if you use different networks a lot
70 #config_ESSID="dhcp"
71 #routes_ESSID=
72 #fallback_ESSID=
73
74 # Setting name/domain server causes /etc/resolv.conf to be overwritten
75 # Note that if DHCP is used, and you want this to take precedence then
76 # please put -R in your dhcpcd options
77 #dns_servers_ESSID="192.168.0.1 192.168.0.2"
78 #dns_domain_ESSID="some.domain"
79 #dns_search_path_ESSID="search.this.domain search.that.domain"
80 # Please check the man page for resolv.conf for more information
81 # as domain and search (searchdomains) are mutually exclusive and
82 # searchdomains takes precedence
83
84 # You can also set any of the /etc/conf.d/net variables per MAC address
85 # incase you use Access Points with the same ESSID but need different
86 # networking configs. Below is an example - of course you use the same
87 # method with other variables
88 #config_001122334455="dhcp"
89 #dns_servers_001122334455="192.168.0.1 192.168.0.2"
90
91 # Map a MAC address to an ESSID
92 # This is used when the Access Point is not broadcasting it's ESSID
93 # WARNING: This will override the ESSID being broadcast due to some
94 # Access Points sending an ESSID even when they have been configured
95 # not to!
96 # Change 001122334455 to the MAC address and ESSID to the ESSID
97 # it should map to
98 #mac_essid_001122334455="ESSID"
99
100 # This lists the preferred ESSIDs to connect to in order
101 # ESSID's can contain any characters here as they must match the broadcast
102 # ESSID exactly.
103 # Surround each ESSID with the " character and seperate them with a space
104 # If the first ESSID isn't found then it moves onto the next
105 # If this isn't defined then it connects to the first one found
106 #preferred_aps="'ESSID 1' 'ESSID 2'"
107
108 # You can also define a preferred_aps list per interface
109 #preferred_aps_eth0="'ESSID 3' 'ESSID 4'"
110
111 # You can also say whether we only connect to preferred APs or not
112 # Values are "any", "preferredonly", "forcepreferred", "forcepreferredonly"
113 # and "forceany"
114 # "any" means it will connect to visible APs in the preferred list and then
115 # any other available AP
116 # "preferredonly" means it will only connect to visible APs in the preferred
117 # list
118 # "forcepreferred" means it will forceably connect to APs in order if it does
119 # not find them in a scan
120 # "forcepreferredonly" means it forceably connects to the APs in order and
121 # does not bother to scan
122 # "forceany" does the same as forcepreferred + connects to any other
123 # available AP
124 # Default is "any"
125 #associate_order="any"
126 #associate_order_eth0="any"
127
128 # You can define blacklisted Access Points in the same way
129 #blacklist_aps="'ESSID 1' 'ESSID 2'"
130 #blacklist_aps_eth0="'ESSID 3' 'ESSID 4'"
131
132 # If you have more than one wireless card, you can say if you want
133 # to allow each card to associate with the same Access Point or not
134 # Values are "yes" and "no"
135 # Default is "yes"
136 #unique_ap="yes"
137 #unique_ap_eth0="yes"
138
139 # IMPORTANT: preferred_only, blacklisted_aps and unique_ap only work when
140 # essid_eth0 is not set and your card is capable of scanning
141
142 # NOTE: preferred_aps list ignores blacklisted_aps - so if you have
143 # the same ESSID in both, well, you're a bit silly :p
144
145
146 ##############################################################################
147 # ADVANCED CONFIGURATION
148 #
149 # Two functions can be defined which will be called surrounding the
150 # associate function. The functions are called with the interface
151 # name first so that one function can control multiple adapters.
152 #
153 # The return values for the preassociate function should be 0
154 # (success) to indicate that configuration or deconfiguration of the
155 # interface can continue. If preassociate returns a non-zero value, then
156 # interface configuration will be aborted.
157 #
158 # The return value for the postassociate function is ignored
159 # since there's nothing to do if it indicates failure.
160
161 #preassociate() {
162 # # The below adds two configuration variables leap_user_ESSID
163 # # and leap_pass_ESSID. When they are both confiugred for the ESSID
164 # # being connected to then we run the CISCO LEAP script
165 #
166 # local user pass
167 # eval user=\"\$\{leap_user_${ESSIDVAR}\}\"
168 # eval pass=\"\$\{leap_pass_${ESSIDVAR}\}\"
169 #
170 # if [ -n "${user}" -a -n "${pass}" ]; then
171 # if [ ! -x /opt/cisco/bin/leapscript ]; then
172 # eend "For LEAP support, please emerge net-misc/cisco-aironet-client-utils"
173 # return 1
174 # fi
175 # einfo "Waiting for LEAP Authentication on \"${ESSID}\""
176 # if /opt/cisco/bin/leapscript ${user} ${pass} | grep -q 'Login incorrect'; then
177 # ewarn "Login Failed for ${user}"
178 # return 1
179 # fi
180 # fi
181 #
182 # return 0
183 #}
184
185 #postassociate() {
186 # # This function is mostly here for completeness... I haven't
187 # # thought of anything nifty to do with it yet ;-)
188 # # Return 0 always
189 # return 0
190 #}

  ViewVC Help
Powered by ViewVC 1.1.20