diff options
Diffstat (limited to 'handbook/gettext/hb-working-rcscripts.xml.pot')
-rw-r--r-- | handbook/gettext/hb-working-rcscripts.xml.pot | 202 |
1 files changed, 117 insertions, 85 deletions
diff --git a/handbook/gettext/hb-working-rcscripts.xml.pot b/handbook/gettext/hb-working-rcscripts.xml.pot index 62b6ded..a2ad159 100644 --- a/handbook/gettext/hb-working-rcscripts.xml.pot +++ b/handbook/gettext/hb-working-rcscripts.xml.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-03-02 17:29+0500\n" +"POT-Creation-Date: 2011-09-05 14:12+0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -14,11 +14,11 @@ msgid "Gentoo uses a special initscript format which, amongst other features, al msgstr "" #: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(version):17 -msgid "2" +msgid "4" msgstr "" #: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(date):18 -msgid "2011-03-02" +msgid "2011-08-17" msgstr "" #: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):21 @@ -386,295 +386,327 @@ msgstr "" #: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):429 #, no-wrap -msgid "\n#!/sbin/runscript\n\ndepend() {\n <comment>(Dependency information)</comment>\n}\n\nstart() {\n <comment>(Commands necessary to start the service)</comment>\n}\n\nstop() {\n <comment>(Commands necessary to stop the service)</comment>\n}\n\nrestart() {\n <comment>(Commands necessary to restart the service)</comment>\n}\n" +msgid "\n#!/sbin/runscript\n\ndepend() {\n <comment>(Dependency information)</comment>\n}\n\nstart() {\n <comment>(Commands necessary to start the service)</comment>\n}\n\nstop() {\n <comment>(Commands necessary to stop the service)</comment>\n}\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):449 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):445 msgid "Any init script <e>requires</e> the <c>start()</c> function to be defined. All other sections are optional." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):457 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):453 msgid "Dependencies" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):460 -msgid "There are two dependencies you can define: <c>use</c> and <c>need</c>. As we have mentioned before, the <c>need</c> dependency is more strict than the <c>use</c> dependency. Following this dependency type you enter the service you depend on, or the <e>virtual</e> dependency." +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):456 +msgid "There are two dependency-alike settings you can define that influence the start-up or sequencing of init scripts: <c>use</c> and <c>need</c>. Next to these two, there are also two order-influencing methods called <c>before</c> and <c>after</c>. 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)." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):467 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):466 +msgid "The <c>use</c> settings informs the init system that this script <e>uses</e> functionality offered by the selected script, but does not directly depend on it. A good example would be <c>use logger</c> or <c>use dns</c>. If those services are available, they will be put in good use, but if you do not have a logger or DNS server the services will still work. If the services exist, then they are started before the script that <c>use</c>'s them." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):474 +msgid "The <c>need</c> setting is a hard dependency. It means that the script that is <c>need</c>'ing another script will not start before the other script is launched successfully. Also, if that other script is restarted, then this one will be restarted as well." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):480 +msgid "When using <c>before</c>, then the given script is launched before the selected one <e>if</e> the selected one is part of the init level. So an init script <path>xdm</path> that defines <c>before alsasound</c> will start before the <path>alsasound</path> script, but only if <path>alsasound</path> is scheduled to start as well in the same init level. If <path>alsasound</path> is not scheduled to start too, then this particular setting has no effect and <path>xdm</path> will be started when the init system deems it most appropriate." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):490 +msgid "Similarly, <c>after</c> informs the init system that the given script should be launched after the selected one <e>if</e> the selected one is part of the init level. If not, then the setting has no effect and the script will be launched by the init system when it deems it most appropriate." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):498 +msgid "It should be clear from the above that <c>need</c> 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." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):505 +msgid "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 <e>virtuals</e>." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):511 msgid "A <e>virtual</e> dependency is a dependency that a service provides, but that is not provided solely by that service. Your init script can depend on a system logger, but there are many system loggers available (metalogd, syslog-ng, sysklogd, ...). As you cannot <c>need</c> every single one of them (no sensible system has all these system loggers installed and running) we made sure that all these services <c>provide</c> a virtual dependency." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):476 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):520 msgid "Let us take a look at the dependency information for the postfix service." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):480 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):524 msgid "Dependency information for Postfix" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):480 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):524 #, no-wrap msgid "\ndepend() {\n need net\n use logger dns\n provide mta\n}\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):488 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):532 msgid "As you can see, the postfix service:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):493 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):537 msgid "requires the (virtual) <c>net</c> dependency (which is provided by, for instance, <path>/etc/init.d/net.eth0</path>)" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):497 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):541 msgid "uses the (virtual) <c>logger</c> dependency (which is provided by, for instance, <path>/etc/init.d/syslog-ng</path>)" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):501 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):545 msgid "uses the (virtual) <c>dns</c> dependency (which is provided by, for instance, <path>/etc/init.d/named</path>)" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):505 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(li):549 msgid "provides the (virtual) <c>mta</c> dependency (which is common for all mail servers)" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):514 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):558 msgid "Controlling the Order" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):517 -msgid "In some cases you might not require a service, but want your service to be started <c>before</c> (or <c>after</c>) another service <e>if</e> it is available on the system (note the conditional - this is no dependency anymore) <e>and</e> run in the same runlevel (note the conditional - only services in the same runlevel are involved). You can provide this information using the <c>before</c> or <c>after</c> settings." +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):561 +msgid "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 <c>use</c> and <c>need</c>, but also through the order settings <c>before</c> and <c>after</c>. As we have described these earlier already, let's take a look at the Portmap service as an example of such init script." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):526 -msgid "As an example we view the settings of the Portmap service:" -msgstr "" - -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):530 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):570 msgid "The depend() function in the Portmap service" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):530 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):570 #, no-wrap msgid "\ndepend() {\n need net\n before inetd\n before xinetd\n}\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):538 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):578 msgid "You can also use the \"*\" glob to catch all services in the same runlevel, although this isn't advisable." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):543 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):583 msgid "Running an init script as first script in the runlevel" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):543 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):583 #, no-wrap msgid "\ndepend() {\n before *\n}\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):549 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):589 msgid "If your service must write to local disks, it should need <c>localmount</c>. If it places anything in <path>/var/run</path> such as a pidfile, then it should start after <c>bootmisc</c>:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):555 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):595 msgid "Example depend() function" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):555 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):595 #, no-wrap msgid "\ndepend() {\n need localmount\n after bootmisc\n}\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):565 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):605 msgid "Standard Functions" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):568 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):608 msgid "Next to the <c>depend()</c> functionality, you also need to define the <c>start()</c> function. This one contains all the commands necessary to initialize your service. It is advisable to use the <c>ebegin</c> and <c>eend</c> functions to inform the user about what is happening:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):575 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):615 msgid "Example start() function" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):575 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):615 #, no-wrap -msgid "\nstart() {\n ebegin \"Starting my_service\"\n start-stop-daemon --start --exec /path/to/my_service \\\n --pidfile /path/to/my_pidfile\n eend $?\n}\n" +msgid "\nstart() {\n if [ \"${RC_CMD}\" = \"restart\" ];\n then\n <comment># Do something in case a restart requires more than stop, start</comment>\n fi\n\n ebegin \"Starting my_service\"\n start-stop-daemon --start --exec /path/to/my_service \\\n --pidfile /path/to/my_pidfile\n eend $?\n}\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):584 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):629 msgid "Both <c>--exec</c> and <c>--pidfile</c> should be used in start and stop functions. If the service does not create a pidfile, then use <c>--make-pidfile</c> if possible, though you should test this to be sure. Otherwise, don't use pidfiles. You can also add <c>--quiet</c> to the <c>start-stop-daemon</c> options, but this is not recommended unless the service is extremely verbose. Using <c>--quiet</c> may hinder debugging if the service fails to start." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(note):594 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):639 +msgid "Another notable setting used in the above example is to check the contents of the <c>RC_CMD</c> variable. Unlike the previous init script system, the newer <c>openrc</c> system does not support script-specific restart functionality. Instead, the script needs to check the contents of the <c>RC_CMD</c> variable to see if a function (be it <c>start()</c> or <c>stop()</c>) is called as part of a restart or not." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(note):648 msgid "Make sure that <c>--exec</c> actually calls a service and not just a shell script that launches services and exits -- that's what the init script is supposed to do." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):600 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):654 msgid "If you need more examples of the <c>start()</c> function, please read the source code of the available init scripts in your <path>/etc/init.d</path> directory." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):606 -msgid "Other functions you can define are: <c>stop()</c> and <c>restart()</c>. You are not obliged to define these functions! Our init system is intelligent enough to fill these functions by itself if you use <c>start-stop-daemon</c>." +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):660 +msgid "Another function you can define is <c>stop()</c>. You are not obliged to define this function though! Our init system is intelligent enough to fill in this function by itself if you use <c>start-stop-daemon</c>." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):612 -msgid "Although you do not <e>have</e> to create a <c>stop()</c> function, here is an example:" +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):666 +msgid "Here is an example of a <c>stop()</c> function:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):617 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):670 msgid "Example stop() function" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):617 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):670 #, no-wrap msgid "\nstop() {\n ebegin \"Stopping my_service\"\n start-stop-daemon --stop --exec /path/to/my_service \\\n --pidfile /path/to/my_pidfile\n eend $?\n}\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):626 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):679 msgid "If your service runs some other script (for example, bash, python, or perl), and this script later changes names (for example, <c>foo.py</c> to <c>foo</c>), then you will need to add <c>--name</c> to <c>start-stop-daemon</c>. You must specify the name that your script will be changed to. In this example, a service starts <c>foo.py</c>, which changes names to <c>foo</c>:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):634 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):687 msgid "A service that starts the foo script" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):634 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):687 #, no-wrap msgid "\nstart() {\n ebegin \"Starting my_script\"\n start-stop-daemon --start --exec /path/to/my_script \\\n --pidfile /path/to/my_pidfile --name foo\n eend $?\n}\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):643 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):696 msgid "<c>start-stop-daemon</c> has an excellent man page available if you need more information:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):648 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):701 msgid "Getting the man page for start-stop-daemon" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):648 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):701 #, no-wrap msgid "\n$ <i>man start-stop-daemon</i>\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):652 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):705 msgid "Gentoo's init script syntax is based on the Bourne Again Shell (bash) so you are free to use bash-compatible constructs inside your init script. However, you may want to write your init scripts to be POSIX-compliant. Future init script systems may allow symlinking <path>/bin/sh</path> to other shells besides bash. Init scripts that rely on bash-only features will then break these configurations." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):664 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):717 msgid "Adding Custom Options" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):667 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):720 msgid "If you want your init script to support more options than the ones we have already encountered, you should add the option to the <c>opts</c> variable, and create a function with the same name as the option. For instance, to support an option called <c>restartdelay</c>:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):674 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):727 msgid "Supporting the restartdelay option" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):674 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):727 #, no-wrap msgid "\nopts=\"${opts} restartdelay\"\n\nrestartdelay() {\n stop\n sleep 3 <comment># Wait 3 seconds before starting again</comment>\n start\n}\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):687 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(impo):737 +msgid "The function <c>restart()</c> cannot be overridden in openrc!" +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):744 msgid "Service Configuration Variables" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):690 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):747 msgid "You don't have to do anything to support a configuration file in <path>/etc/conf.d</path>: if your init script is executed, the following files are automatically sourced (i.e. the variables are available to use):" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):702 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):759 msgid "Also, if your init script provides a virtual dependency (such as <c>net</c>), the file associated with that dependency (such as <path>/etc/conf.d/net</path>) will be sourced too." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):712 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):769 msgid "Changing the Runlevel Behaviour" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):714 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):771 msgid "Who might benefit from this?" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):717 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):774 msgid "Many laptop users know the situation: at home you need to start <c>net.eth0</c> while you don't want to start <c>net.eth0</c> while you're on the road (as there is no network available). With Gentoo you can alter the runlevel behaviour to your own will." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):724 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):781 msgid "For instance you can create a second \"default\" runlevel which you can boot that has other init scripts assigned to it. You can then select at boottime what default runlevel you want to use." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):733 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):790 msgid "Using softlevel" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):736 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):793 msgid "First of all, create the runlevel directory for your second \"default\" runlevel. As an example we create the <path>offline</path> runlevel:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):741 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):798 msgid "Creating a runlevel directory" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):741 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):798 #, no-wrap msgid "\n# <i>mkdir /etc/runlevels/offline</i>\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):745 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):802 msgid "Add the necessary init scripts to the newly created runlevels. For instance, if you want to have an exact copy of your current <c>default</c> runlevel but without <c>net.eth0</c>:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):751 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):808 msgid "Adding the necessary init scripts" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):751 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):808 #, no-wrap msgid "\n<comment>(Copy all services from default runlevel to offline runlevel)</comment>\n# <i>cd /etc/runlevels/default</i>\n# <i>for service in *; do rc-update add $service offline; done</i>\n<comment>(Remove unwanted service from offline runlevel)</comment>\n# <i>rc-update del net.eth0 offline</i>\n<comment>(Display active services for offline runlevel)</comment>\n# <i>rc-update show offline</i>\n<comment>(Partial sample Output)</comment>\n acpid | offline\n domainname | offline\n local | offline\n net.eth0 |\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):766 -msgid "Even though <c>net.eth0</c> has been removed from the offline runlevel, <c>udev</c> will still attempt to start any devices it detects and launch the appropriate services. Therefore, you will need to add each network service you do not want started (as well as services for any other devices that may be started by udev) to <path>/etc/conf.d/rc</path> as shown." +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):823 +msgid "Even though <c>net.eth0</c> has been removed from the offline runlevel, <c>udev</c> might want to attempt to start any devices it detects and launch the appropriate services, a functionality that is called <e>hotplugging</e>. By default, Gentoo does not enable hotplugging." +msgstr "" + +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):830 +msgid "If you do want to enable hotplugging, but only for a selected set of scripts, use the <c>rc_hotplug</c> variable in <path>/etc/rc.conf</path>:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):774 -msgid "Disabling device initiated services in /etc/conf.d/rc" +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):835 +msgid "Disabling device initiated services in /etc/rc.conf" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):774 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):835 #, no-wrap -msgid "\nRC_COLDPLUG=\"yes\"\n<comment>(Next, specify the services you do not want automatically started)</comment>\nRC_PLUG_SERVICES=\"!net.eth0\"\n" +msgid "\n<comment># Allow net.wlan as well as any other service, except those matching net.*\n# to be hotplugged</comment>\nrc_hotplug=\"net.wlan !net.*\"\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(note):780 -msgid "For more information on device initiated services, please see the comments inside <path>/etc/conf.d/rc</path>." +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(note):841 +msgid "For more information on device initiated services, please see the comments inside <path>/etc/rc.conf</path>." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):785 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):846 msgid "Now edit your bootloader configuration and add a new entry for the <c>offline</c> runlevel. For instance, in <path>/boot/grub/grub.conf</path>:" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):790 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre:caption):851 msgid "Adding an entry for the offline runlevel" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):790 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(pre):851 #, no-wrap msgid "\ntitle Gentoo Linux Offline Usage\n root (hd0,0)\n kernel (hd0,0)/kernel-2.4.25 root=/dev/hda3 <i>softlevel=offline</i>\n" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):796 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):857 msgid "VoilĂ , you're all set now. If you boot your system and select the newly added entry at boot, the <c>offline</c> runlevel will be used instead of the <c>default</c> one." msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):805 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(title):866 msgid "Using bootlevel" msgstr "" -#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):808 +#: ../../gentoo/xml/htdocs/doc/en/handbook//hb-working-rcscripts.xml(p):869 msgid "Using <c>bootlevel</c> is completely analogous to <c>softlevel</c>. The only difference here is that you define a second \"boot\" runlevel instead of a second \"default\" runlevel." msgstr "" |