/[vps]/baselayout-vserver/trunk/net-scripts/conf.d/net.example
Gentoo

Contents of /baselayout-vserver/trunk/net-scripts/conf.d/net.example

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65 - (show annotations) (download)
Mon Nov 7 19:00:12 2005 UTC (8 years, 8 months ago) by phreak
File size: 26461 byte(s)
Merging uberlord's latest changes of baselayout (r1599).
1 ##############################################################################
2 # QUICK-START
3 #
4 # The quickest start is if you want to use DHCP.
5 # In that case, everything should work out of the box, no configuration
6 # necessary, though the startup script will warn you that you haven't
7 # specified anything.
8 #
9 # If you want to use a static address or use DHCP explicitly, jump
10 # down to the section labelled INTERFACE HANDLERS.
11 #
12 # If you want to do anything more fancy, you should take the time to
13 # read through the rest of this file.
14
15 ##############################################################################
16 # DEFAULTS
17 #
18 # hotplug_eth0="yes"
19 # Do we allow hotplug to bring up interfaces or not? The default is we do,
20 # otherwise put no in the above value.
21 # NOTE: hotplug just has to be installed for hotplugging to work - it does
22 # not matter if it's in any runlevel or not.
23
24 ##############################################################################
25 # MODULES
26 #
27 # We now support modular networking scripts which means we can easily
28 # add support for new interface types and modules while keeping
29 # compatability with existing ones.
30 #
31 # Modules load by default if the package they need is installed. If
32 # you specify a module here that doesn't have it's package installed
33 # then you get an error stating which package you need to install.
34 # Ideally, you only use the modules setting when you have two or more
35 # packages installed that supply the same service.
36 #
37 # In other words, you probably should DO NOTHING HERE...
38
39 # Prefer ifconfig over iproute2
40 #modules=( "iproute2" )
41
42 # You can also specify other modules for an interface
43 # In this case we prefer udhcpc over dhcpcd
44 #modules_eth0=( "udhcpc" )
45
46 # You can also specify which modules not to use - for example you may be
47 # using a supplicant or linux-wlan-ng to control wireless configuration but
48 # you still want to configure network settings per ESSID associated with.
49 #modules=( "!iwconfig" "!wpa_supplicant" )
50 # IMPORTANT: If you need the above, please disable modules in that order
51
52
53 ##############################################################################
54 # INTERFACE HANDLERS
55 #
56 # We provide two interface handlers presently: ifconfig and iproute2.
57 # You need one of these to do any kind of network configuration.
58 # For ifconfig support, emerge sys-apps/net-tools
59 # For iproute2 support, emerge sys-apps/iproute2
60
61 # If you don't specify an interface then we prefer iproute2 if it's installed
62 # To prefer ifconfig over iproute2
63 #modules=( "ifconfig" )
64
65 # For a static configuration, use something like this
66 # (They all do exactly the same thing btw)
67 #config_eth0=( "192.168.0.2/24" )
68 #config_eth0=( "192.168.0.2 netmask 255.255.255.0" )
69
70 # We can also specify a broadcast
71 #config_eth0=( "192.168.0.2/24 brd 192.168.0.255" )
72 #config_eth0=( "192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" )
73
74 # If you need more than one address, you can use something like this
75 # NOTE: ifconfig creates an aliased device for each extra IPv4 address
76 # (eth0:1, eth0:2, etc)
77 # iproute2 does not do this as there is no need to
78 #config_eth0=(
79 # "192.168.0.2/24"
80 # "192.168.0.3/24"
81 # "192.168.0.4/24"
82 #)
83 # Or you can use sequence expresions
84 #config_eth0=( "192.168.0.{2..4}/24" )
85 # which does the same as above. Be careful though as if you use this and
86 # fallbacks, you have to ensure that both end up with the same number of
87 # values otherwise your fallback won't work correctly.
88
89 # You can also use IPv6 addresses
90 # (you should always specficy a prefix length with IPv6 here)
91 #config_eth0=(
92 # "192.168.0.2/24"
93 # "4321:0:1:2:3:4:567:89ab/64"
94 # "4321:0:1:2:3:4:567:89ac/64"
95 #)
96
97 # If you wish to keep existing addresses + routing and the interface is up,
98 # you can specify a noop (no operation). If the interface is down or there
99 # are no addresses assigned, then we move onto the next step (default dhcp)
100 # This is useful when configuring your interface with a kernel command line
101 # or similar
102 #config_eth0=( "noop" "192.168.0.2/24" )
103
104 # If you don't want ANY address (only useful when calling for advanced stuff)
105 #config_eth0=( "null" )
106
107 # Here's how todo routing if you need it - the below sets the default gateway
108 # and eth0 to be the default route for IPv6 unicast addresses
109 #routes_eth0=(
110 # "default via 192.168.0.1"
111 # "::/0"
112 #)
113
114 # If a specified module fails (like dhcp - see below), you can specify a
115 # fallback like so
116 #fallback_eth0=( "192.168.0.2 netmask 255.255.255.0" )
117 #fallback_route_eth0=( "default via 192.168.0.1" )
118
119 # NOTE: fallback entry must match the entry location in config_eth0
120 # As such you can only have one fallback route.
121
122 # Some users may need to alter the MTU - here's how
123 #mtu_eth0="1500"
124
125 ##############################################################################
126 # OPTIONAL MODULES
127
128 # INTERFACE RENAMING
129 # There is no consistent device renaming scheme for Linux.
130 # The preferred way of naming devices is via the kernel module directly or
131 # by using udev (http://www.reactivated.net/udevrules.php)
132
133 # If you are unable to write udev rules, then we do provide a way of renaming
134 # the interface based on it's MAC address, but it is not optimal.
135 # Here is how to rename an interface whose MAC address is 00:11:22:33:44:55
136 # to foo1
137 #rename_001122334455="foo1"
138
139 # You can also do this based on current device name - although this is not
140 # recommended. Here we rename eth1 to foo2.
141 #rename_eth1="foo2"
142
143 #-----------------------------------------------------------------------------
144 # WIRELESS (802.11 support)
145 # Wireless can be provided by iwconfig or wpa_supplicant
146
147 # iwconfig
148 # emerge net-wireless/wireless-tools
149 # Wireless options are held in /etc/conf.d/wireless - but could be here too
150 # Consult the sample file /etc/conf.d/wireless.example for instructions
151 # iwconfig is the default
152
153 # wpa_supplicant
154 # emerge net-wireless/wpa-supplicant
155 # Wireless options are held in /etc/wpa_supplicant.conf
156 # Consult the sample file /etc/wpa_supplicant.conf.example for instructions
157 # To choose wpa_supplicant over iwconfig
158 #modules=( "wpa_supplicant" )
159 # To configure wpa_supplicant
160 #wpa_supplicant_eth0="-Dprism54" # For Prism54 based cards
161 #wpa_supplicant_ath0="-Dmadwifi" # For Atheros based cards
162 # Consult wpa_supplicant for more drivers
163 # By default we give wpa_suppliant 60 seconds to associate and authenticate
164 # 0 means we wait indefinitely
165 #associate_timeout_eth0=60
166
167 # GENERIC WIRELESS OPTIONS
168 # PLEASE READ THE INSTRUCTIONS IN /etc/conf.d/wireless.example FOR
169 # HOW TO USE THIS ESSID VARIABLE
170 # You can also override any settings found here per ESSID - which is very
171 # handy if you use different networks a lot
172 #config_ESSID=( "dhcp" )
173 #dhcpcd_ESSID="-t 5"
174
175 # Setting name/domain server causes /etc/resolv.conf to be overwritten
176 # Note that if DHCP is used, and you want this to take precedence then
177 # set dhcp_ESSID="nodns"
178 #dns_servers_ESSID=( "192.168.0.1" "192.168.0.2" )
179 #dns_domain_ESSID="some.domain"
180 #dns_search_ESSID="search.this.domain search.that.domain"
181 # Please check the man page for resolv.conf for more information
182 # as domain and search are mutually exclusive.
183
184 # You can also override any settings found here per MAC address of the AP
185 # incase you use Access Points with the same ESSID but need different
186 # networking configs. Below is an example - of course you use the same
187 # method with other variables
188 #mac_config_001122334455=( "dhcp" )
189 #mac_dhcpcd_001122334455="-t 10"
190 #mac_dns_servers_001122334455=( "192.168.0.1" "192.168.0.2" )
191
192 # When an interface has been associated with an Access Point, a global
193 # variable called ESSID is set to the Access Point's ESSID for use in the
194 # pre/post user functions below (although it's not available in preup as you
195 # won't have associated then)
196
197 # If you're using anything else to configure wireless on your interface AND
198 # you have installed any of the above packages, you need to disable them
199 #modules=( "!iwconfig" "!wpa_supplicant" )
200
201 #-----------------------------------------------------------------------------
202 # DHCP
203 # DHCP can be provided by dhcpcd, dhclient, udhcpc or pump
204 #
205 # dhclient: emerge net-misc/dhcp
206 # dhcpcd: emerge net-misc/dhcpcd
207 # pump: emerge net-misc/pump
208 # udhcpc: emerge net-misc/udhcp
209
210 # If you have more than one DHCP client installed, you need to specify which
211 # one to use - otherwise we default to dhcpcd if available
212 #modules=( "udhcpc" ) # to select udhcpc over dhcpcd
213 #
214 # Notes:
215 # - dhcpcd, udhcpc and pump send the current hostname
216 # to the DHCP server by default
217 # pump always sends the current hostname - see below to disable
218 # udhcpc and dhcpcd from doing this
219 # - dhcpcd does not daemonize when the lease time is infinite
220 # - udhcp-0.9.3-r3 and earlier does not support getting NTP servers
221 # - dhclient does not support getting NTP servers
222 # - pump does not support getting NIS servers
223 # - DHCP tends to erase any existing device information - so add
224 # static addresses after dhcp if you need them
225 # - dhclient and udhcpc can set other resolv.conf options such as "option"
226 # and "sortlist"- see the System module for more details
227
228 # Regardless of which DHCP client you prefer, you configure them the
229 # same way using one of following depending on which interface modules
230 # you're using.
231 #config_eth0=( "dhcp" )
232
233 # For passing custom options to dhcpcd use something like the following. This
234 # example reduces the timeout for retrieving an address from 60 seconds (the
235 # default) to 10 seconds.
236 #dhcpcd_eth0="-t 10"
237
238 # dhclient, udhcpc and pump don't have many runtime options
239 # You can pass options to them in a similar manner to dhcpcd though
240 #dhclient_eth0="..."
241 #udhcpc_eth0="..."
242 #pump_eth0="..."
243
244 # To set options for dhclient, you need to have an /etc/dhclient.conf file
245 # See the dhclient man page for details
246
247 # GENERIC DHCP OPTIONS
248 # Set generic DHCP options like so
249 #dhcp_eth0="release nodns nontp nonis nogateway nosendhost"
250
251 # This tells the dhcp client to release it's lease when it stops, not to
252 # overwrite dns, ntp and nis settings, not to set a default route and not to
253 # send the current hostname to the dhcp server and when it starts.
254 # You can use any combination of the above options - the default is not to
255 # use any of them.
256
257 # DHCLIENT
258 # dhclient can modify /etc/dhclient.conf (or the file specified by the -cf
259 # option) with the current hostname and to strip any script lines. To enable
260 # this, add dhclient_edit_config="yes" to /etc/conf.d/net
261
262 #-----------------------------------------------------------------------------
263 # For APIPA support, emerge net-misc/iputils or net-analyzer/arping
264
265 # APIPA is a module that tries to find a free address in the range
266 # 169.254.0.0-169.254.255.255 by arping a random address in that range on the
267 # interface. If no reply is found then we assign that address to the interface
268
269 # This is only useful for LANs where there is no DHCP server and you don't
270 # connect directly to the internet.
271 #config_eth0=( "dhcp" )
272 #fallback_eth0=( "apipa" )
273
274 #-----------------------------------------------------------------------------
275 # ARPING Gateway configuration
276 # and
277 # Automatic Private IP Addressing (APIPA)
278 # For arpingnet / apipa support, emerge net-misc/iputils or net-analyzer/arping
279 #
280 # This is a module that tries to find a gateway IP. If it exists then we use
281 # that gateways configuration for our own. For the configuration variables
282 # simply ensure that each ocet is zero padded and the dots are removed.
283 # Below is an example.
284 #
285 #arping_eth0="192.168.0.1 10.0.0.1"
286 #config_192168000001=( "192.168.0.2/24" )
287 #routes_192168000001=( "default via 192.168.0.1" )
288 #dns_servers_192168000001=( "192.168.0.1" )
289 #config_010000000001=( "10.0.0.254/8" )
290 #routes_010000000001=( "default via 10.0.0.1" )
291 #dns_servers_010000000001=( "10.0.0.1" )
292
293 # If we don't find any gateways (or there are none configured) then we try and
294 # use APIPA to find a free address in the range 169.254.0.0-169.254.255.255
295 # by arping a random address in that range on the interface. If no reply is
296 # found then we assign that address to the interface.
297
298 # This is only useful for LANs where there is no DHCP server.
299 #config_eth0=( "arping" )
300
301 # or if no DHCP server can be found
302 #config_eth0=( "dhcp" )
303 #fallback_eth0=( "arping" )
304
305 #-----------------------------------------------------------------------------
306 # VLAN (802.1q support)
307 # For VLAN support, emerge net-misc/vconfig
308
309 # Specify the VLAN numbers for the interface like so
310 # Please ensure your VLAN IDs are NOT zero-padded
311 #vlans_eth0="1 2"
312
313 # You can also configure the VLAN - see for vconfig man page for more details
314 #vconfig_eth0=( "set_name_type VLAN_PLUS_VID_NO_PAD" )
315 #vconfig_vlan1=( "set_flag 1" "set_egress_map 2 6" )
316 #config_vlan1=( "172.16.3.1 netmask 255.255.254.0" )
317 #config_vlan2=( "172.16.2.1 netmask 255.255.254.0" )
318
319 # NOTE: Vlans can be configured with a . in their interface names
320 # When configuring vlans with this name type, you need to replace . with a _
321 #config_eth0.1=( "dhcp" ) - does not work
322 #config_eth0_1=( "dhcp" ) - does work
323
324 #-----------------------------------------------------------------------------
325 # Bonding
326 # For link bonding/trunking emerge net-misc/ifenslave
327
328 # To bond interfaces together
329 #slaves_bond0="eth0 eth1 eth2"
330 #config_bond0=( "null" ) # You may not want to assign an IP the the bond
331
332 # If any of the slaves require extra configuration - for example wireless or
333 # ppp devices - we need to write a depend function for the bond so they get
334 # configured correctly.
335 # This is exactly the same as a depend() function in our init scripts
336 #depend_br0() {
337 # need net.eth0 net.eth1
338 #}
339
340
341 #-----------------------------------------------------------------------------
342 # PPP
343 # For PPP support, emerge net-dialup/ppp
344 # PPP is used for most dialup connections, including ADSL.
345 # The older ADSL module is documented below, but you are encouraged to try
346 # this module first.
347 #
348 # You need to create the PPP net script yourself. Make it like so
349 #cd /etc/init.d
350 #ln -s net.lo net.ppp0
351 #
352 # Each PPP interface requires an interface to use as a "Link"
353 #link_ppp0="eth0" # PPPoE requires an ethernet interface
354 #link_ppp0="/dev/ttyS0" # Most PPP links will use a serial port
355 #
356 # PPP requires at least a username. You can optionally set a password here too
357 # If you don't, then it will use the password specified in /etc/ppp/*-secrets
358 # against the specified username
359 #username_ppp0="user"
360 #password_ppp0="password"
361 #
362 # The PPP daemon has many options you can specify - although there are many
363 # and may seem daunting, it is recommended that you read the ppp man page
364 # before enabling any of them
365 #pppd_ppp0=(
366 # "debug" # Enables syslog debugging
367 # "noauth" # Do not require the peer to authenticate itself
368 # "defaultroute" # Make this PPP interface the default route
369 # "userpeerdns" # Use the DNS settings provided by PPP
370 #
371 # On demand options
372 # "demand" # Enable dial on demand
373 # "idle 30" # The link will go down after 30 seconds of inactivity
374 # "10.112.112.112:10.112.112.113" # Phony IP addresses
375 # "ipcp-accept-remote" # Accept the peers idea of remote address
376 # "ipcp-accept-local" # Accept the peers idea of local address
377 # "holdoff 3" # Wait 3 seconds after link dies before re-starting
378 # "lcp-echo-interval 15" # Send a LCP echo every 15 seconds
379 # "lcp-echo-failure 3" # Make peer dead after 3 seconds of in-activity
380 #
381 # Compression options - use these to completely disable compression
382 # "noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp"
383 #
384 # Dial-up settings
385 # "lock" # Lock serial port
386 # "115200" # Set the serial port baud rate
387 # "modem crtscts" # Enable hardware flow control
388 # "192.168.0.1:192.168.0.2" # Local and remote IP addresses
389 #)
390 #
391 # Dial-up PPP users need to specify a telephone number
392 #phone_number_ppp0=( "12345689" )
393 # They will also need a chat script - here's a good one
394 #chat_ppp0=(
395 # 'ABORT' 'BUSY'
396 # 'ABORT' 'ERROR'
397 # 'ABORT' 'NO ANSWER'
398 # 'ABORT' 'NO CARRIER'
399 # 'ABORT' 'NO DIALTONE'
400 # 'ABORT' 'Invalid Login'
401 # 'ABORT' 'Login incorrect'
402 # 'TIMEOUT' '5'
403 # '' 'ATZ'
404 # 'OK' 'AT' # Put your modem initialization string here
405 # 'OK' 'ATDT\T'
406 # 'TIMEOUT' '60'
407 # 'CONNECT' ''
408 # 'TIMEOUT' '5'
409 # '~--' ''
410 #)
411
412 #-----------------------------------------------------------------------------
413 # ADSL
414 # For ADSL support, emerge net-dialup/rp-pppoe
415 # WARNING: This ADSL module is being deprecated in favour of the PPP module
416 # above.
417 # You should make the following settings and also put your
418 # username/password information in /etc/ppp/pap-secrets
419
420 # Configure the interface to use ADSL
421 #config_eth0=( "adsl" )
422
423 # You probably won't need to edit /etc/ppp/pppoe.conf if you set this
424 #adsl_user_eth0="my-adsl-username"
425
426 #-----------------------------------------------------------------------------
427 # ISDN
428 # For ISDN support, emerge net-dialup/isdn4k-utils
429 # You should make the following settings and also put your
430 # username/password information in /etc/ppp/pap-secrets
431
432 # Configure the interface to use ISDN
433 #config_ippp0=( "dhcp" )
434 # It's important to specify dhcp if you need it!
435 #config_ippp0=( "192.168.0.1/24" )
436 # Otherwise, you can use a static IP
437
438 # NOTE: The interface name must be either ippp or isdn followed by a number
439
440 # You may need this option to set the default route
441 #ipppd_eth0="defaultroute"
442
443 #-----------------------------------------------------------------------------
444 # MAC changer
445 # To set a specific MAC address
446 #mac_eth0="00:11:22:33:44:55"
447
448 # For changing MAC addresses using the below, emerge net-analyzer/macchanger
449 # - to randomize the last 3 bytes only
450 #mac_eth0="random-ending"
451 # - to randomize between the same physical type of connection (eg fibre,
452 # copper, wireless) , all vendors
453 #mac_eth0="random-samekind"
454 # - to randomize between any physical type of connection (eg fibre, copper,
455 # wireless) , all vendors
456 #mac_eth0="random-anykind"
457 # - full randomization - WARNING: some MAC addresses generated by this may NOT
458 # act as expected
459 #mac_eth0="random-full"
460 # custom - passes all parameters directly to net-analyzer/macchanger
461 #mac_eth0="some custom set of parameters"
462
463 # You can also set other options based on the MAC address of your network card
464 # Handy if you use different docking stations with laptops
465 #config_001122334455=( "dhcp" )
466
467 #-----------------------------------------------------------------------------
468 # TUN/TAP
469 # For TUN/TAP support emerge sys-apps/usermode-utilities
470 #
471 # NOTE: The interface name must be either tun or tap followed by a number
472 #config_tun1=( "192.168.0.1/24")
473
474 # For passing custom options to tunctl use something like the following. This
475 # example sets the owner to adm
476 #tunctl_tun1="-u adm"
477
478 #-----------------------------------------------------------------------------
479 # Bridging (802.1d)
480 # For bridging support emerge net-misc/bridge-utils
481
482 # To add ports to bridge br0
483 #bridge_br0="eth0 eth1"
484 # or dynamically add them when the interface comes up
485 #bridge_add_eth0="br0"
486 #bridge_add_eth1="br0"
487
488 # You need to configure the ports to null values so dhcp does not get started
489 #config_eth0=( "null" )
490 #config_eth1=( "null" )
491
492 # Finally give the bridge an address - dhcp or a static IP
493 #config_br0=( "dhcp" ) # may not work when adding ports dynamically
494 #config_br0=( "192.168.0.1/24" )
495
496 # If any of the ports require extra configuration - for example wireless or
497 # ppp devices - we need to write a depend function for the bridge so they get
498 # configured correctly.
499 # This is exactly the same as a depend() function in our init scripts
500 #depend_br0() {
501 # need net.eth0 net.eth1
502 #}
503
504 # NOTE: This creates an interface called br0 - you can give the interface
505 # any name you like
506
507 # Below is an example of configuring the bridge
508 # Consult "man brctl" for more details
509 #brctl_br0=( "setfd 0" "sethello 0" "stp off" )
510
511 #-----------------------------------------------------------------------------
512 # Tunnelling
513 # For GRE tunnels
514 #iptunnel_vpn0="mode gre remote 207.170.82.1 key 0xffffffff ttl 255"
515
516 # For IPIP tunnels
517 #iptunnel_vpn0="mode ipip remote 207.170.82.2 ttl 255"
518
519 # To configure the interface
520 #config_vpn0=( "192.168.0.2 pointopoint 192.168.1.2" ) # ifconfig style
521 #config_vpn0=( "192.168.0.2 peer 192.168.1.1" ) # iproute2 style
522
523 #-----------------------------------------------------------------------------
524 # System
525 # For configuring system specifics such as domain, dns, ntp and nis servers
526 # It's rare that you would need todo this, but you can anyway.
527 # This is most benefit to wireless users who don't use DHCP so they can change
528 # their configs based on ESSID. See wireless.example for more details
529
530 # To use dns settings such as these, dns_servers_eth0 must be set!
531 # If you omit the _eth0 suffix, then it applies to all interfaces unless
532 # overridden by the interface suffix.
533 # dns_domain_eth0="your.domain"
534 # dns_servers_eth0="192.168.0.2 192.168.0.3"
535 # dns_search_eth0="this.domain that.domain"
536 # dns_options_eth0=( "timeout 1" "rotate" )
537 # dns_sortlist_eth0="130.155.160.0/255.255.240.0 130.155.0.0"
538 # See the man page for resolv.conf for details about the options and sortlist
539 # directives
540
541 # ntp_servers_eth0="192.168.0.2 192.168.0.3"
542
543 # nis_domain_eth0="domain"
544 # nis_servers_eth0="192.168.0.2 192.168.0.3"
545
546 #-----------------------------------------------------------------------------
547 # Cable in/out detection
548 # Sometimes the cable is in, others it's out. Obviously you don't want to
549 # restart net.eth0 every time when you plug it in either.
550 #
551 # netplug is a package that detects this and requires no extra configuration
552 # on your part.
553 # emerge sys-apps/netplug
554 # or
555 # emerge sys-apps/ifplugd
556 # and you're done :)
557
558 # By default we wait 10 seconds for netplug to configure the interface for us
559 # if it doesn't, we abort but leave netplug running and the net.eth0 service
560 # marked as inactive so when a cable is plugged in it starts fine.
561 # plug_timeout="10"
562
563 # If you don't want to use netplug on a specific interface but you have it
564 # installed, you can disable it for that interface via the modules statement
565 # modules_eth0=( "!netplug" )
566 # You can do the same for ifplugd
567
568 # To use specific ifplugd options, fex specifying wiress mode
569 #ifplugd_eth0="--api-mode wlan"
570 # man ifplugd for more options
571
572 ##############################################################################
573 # ADVANCED CONFIGURATION
574 #
575 # Four functions can be defined which will be called surrounding the
576 # start/stop operations. The functions are called with the interface
577 # name first so that one function can control multiple adapters. An extra two
578 # functions can be defined when an interface fails to start or stop.
579 #
580 # The return values for the preup and predown functions should be 0
581 # (success) to indicate that configuration or deconfiguration of the
582 # interface can continue. If preup returns a non-zero value, then
583 # interface configuration will be aborted. If predown returns a
584 # non-zero value, then the interface will not be allowed to continue
585 # deconfiguration.
586 #
587 # The return values for the postup, postdown, failup and faildown functions are
588 # ignored since there's nothing to do if they indicate failure.
589 #
590 # ${IFACE} is set to the interface being brought up/down
591 # ${IFVAR} is ${IFACE} converted to variable name bash allows
592
593 #preup() {
594 # # Test for link on the interface prior to bringing it up. This
595 # # only works on some network adapters and requires the mii-diag
596 # # package to be installed.
597 # if mii-tool ${IFACE} 2> /dev/null | grep -q 'no link'; then
598 # ewarn "No link on ${IFACE}, aborting configuration"
599 # return 1
600 # fi
601 #
602 # # Test for link on the interface prior to bringing it up. This
603 # # only works on some network adapters and requires the ethtool
604 # # package to be installed.
605 # if ethtool ${IFACE} | grep -q 'Link detected: no'; then
606 # ewarn "No link on ${IFACE}, aborting configuration"
607 # return 1
608 # fi
609 #
610 # # Remember to return 0 on success
611 # return 0
612 #}
613
614 #predown() {
615 # # The default in the script is to test for NFS root and disallow
616 # # downing interfaces in that case. Note that if you specify a
617 # # predown() function you will override that logic. Here it is, in
618 # # case you still want it...
619 # if is_net_fs /; then
620 # eerror "root filesystem is network mounted -- can't stop ${IFACE}"
621 # return 1
622 # fi
623 #
624 # # Remember to return 0 on success
625 # return 0
626 #}
627
628 #postup() {
629 # # This function could be used, for example, to register with a
630 # # dynamic DNS service. Another possibility would be to
631 # # send/receive mail once the interface is brought up.
632 # return 0
633 #}
634
635 #postdown() {
636 # # This function is mostly here for completeness... I haven't
637 # # thought of anything nifty to do with it yet ;-)
638 # # Return 0 always
639 # return 0
640 #}
641
642 #failup() {
643 # # This function is mostly here for completeness... I haven't
644 # # thought of anything nifty to do with it yet ;-)
645 #}
646
647 #faildown() {
648 # # This function is mostly here for completeness... I haven't
649 # # thought of anything nifty to do with it yet ;-)
650 #}
651
652 ##############################################################################
653 # FORCING MODULES
654 # The Big Fat Warning :- If you use module forcing do not complain to us or
655 # file bugs about it not working!
656 #
657 # Loading modules is a slow afair - we have to check each one for the following
658 # 1) Code sanity
659 # 2) Has the required package been emerged?
660 # 3) Has it modified anything?
661 # 4) Have all the dependant modules been loaded?
662
663 # Then we have to strip out the conflicting modules based on user preference
664 # and default configuration and sort them into the correct order.
665 # Finally we check the end result for dependancies.
666
667 # This, of course, takes valuable CPU time so we provide module forcing as a
668 # means to speed things up. We still do *some* checking but not much.
669
670 # It is essential that you force modules in the correct order and supply all
671 # the modules you need. You must always supply an interface module - we
672 # supply ifconfig or iproute2.
673
674 # The Big Fat Warning :- If you use module forcing do not complain to us or
675 # file bugs about it not working!
676
677 # Now that we've warned you twice, here's how to do it
678 #modules_force=( "ifconfig" )
679 #modules_force=( "iproute2" "dhcpcd" )
680
681 # We can also apply this to a specific interface
682 #modules_force_eth1=( "iproute2" )
683
684 # The below will not work
685 #modules_force=( "dhcpcd" )
686 # No interface (ifconfig/iproute2)
687 #modules_force=( "ifconfig" "essidnet" "iwconfig" )
688 # Although it will not crash, essidnet will not work as it has to come after
689 # iwconfig
690 #modules_force=( "iproute2" "ifconfig" )
691 # The interface will be setup twice which will cause problems

  ViewVC Help
Powered by ViewVC 1.1.20