--- xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml 2011/08/14 16:12:13 1.34 +++ xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml 2011/08/17 07:57:23 1.35 @@ -4,7 +4,7 @@ - + @@ -14,8 +14,8 @@ these aspects and explains how to deal with these scripts. -3 -2011-08-12 +4 +2011-08-17
Runlevels @@ -454,10 +454,58 @@

-There are two dependencies you can define: use and need. As we -have mentioned before, the need dependency is more strict than the -use dependency. Following this dependency type you enter the service -you depend on, or the virtual dependency. +There are two dependency-alike settings you can define that influence the +start-up or sequencing of init scripts: use and need. Next to +these two, there are also two order-influencing methods called before and +after. These last two are no dependencies per se - they do not make the +original init script fail if the selected one isn't scheduled to start (or fails +to start). +

+ + + +

+It should be clear from the above that need is the only "true" dependency +setting as it affects if the script will be started or not. All the others are +merely pointers towards the init system to clarify in which order scripts can be +(or should be) launched. +

+ +

+Now, if you look at many of Gentoo's available init scripts, you will notice +that some have dependencies on things that are no init scripts. These "things" +we call virtuals.

@@ -511,16 +559,12 @@

-In some cases you might not require a service, but want your service to be -started before (or after) another service if it is -available on the system (note the conditional - this is no dependency anymore) -and run in the same runlevel (note the conditional - only services in the -same runlevel are involved). You can provide this information using the -before or after settings. -

- -

-As an example we view the settings of the Portmap service: +As we described in the previous section, you can tell the init system what order +it should use for starting (or stopping) scripts. This ordering is handled both +through the dependency settings use and need, but also through the +order settings before and after. As we have described these +earlier already, let's take a look at the Portmap service as an example of such +init script.