--- xml/htdocs/doc/en/handbook/hb-net-advanced.xml 2009/02/13 04:40:27 1.15 +++ xml/htdocs/doc/en/handbook/hb-net-advanced.xml 2011/08/14 16:12:13 1.16 @@ -4,7 +4,7 @@ - + @@ -13,8 +13,8 @@ before we learn about modular networking. -8.1 -2009-02-12 +9 +2011-08-13
Advanced Configuration @@ -128,44 +128,23 @@

Init scripts in /etc/init.d can depend on a specific network -interface or just net. net can be defined in /etc/conf.d/rc -to mean different things using the RC_NET_STRICT_CHECKING variable. +interface or just net. All network interfaces in Gentoo's init system provide +what is called net.

- - - - - - - none - The net service is always considered up - - - no - - This basically means that at least one net.* service besides - net.lo must be up. This can be used by notebook users that - have a WIFI and a static NIC, and only wants one up at any given time to - have the net service seen as up. - - - - lo - - This is the same as the no option, but net.lo is also - counted. This should be useful to people that do not care about any specific - interface being up at boot. - - - - yes - - For this ALL network interfaces MUST be up for the net service - to be considered up. - - -
ValueDescription
+

+If, in /etc/rc.conf, rc_depend_strict="YES" is set, then all +network interfaces that provide net must be active before a dependency on "net" +is assumed to be met. In other words, if you have a net.eth0 and +net.eth1 and an init script depends on "net", then both must be +enabled. +

+ +

+On the other hand, if rc_depend_strict="NO" is set, then the "net" +dependency is marked as resolved the moment at least one network interface is +brought up. +

But what about net.br0 depending on net.eth0 and @@ -176,21 +155,19 @@

-The answer is making your own depend() function in +The answer is defining an rc_need_ setting in /etc/conf.d/net.

-# You can use any dependency (use, after, before) as found in current scripts
-depend_br0() {
-  need net.eth0 net.eth1
-}
+rc_need_br0="net.eth0 net.eth1"
 

For a more detailed discussion about dependency, consult the section Writing Init Scripts in the Gentoo -Handbook. +Handbook. More information about /etc/rc.conf is available as +comments within that file.