| … | |
… | |
| 2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
| 3 | |
3 | |
| 4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml,v 1.37 2012/07/24 12:12:52 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml,v 1.38 2012/10/31 19:02:20 swift Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <abstract> |
11 | <abstract> |
| 12 | Gentoo uses a special initscript format which, amongst other features, allows |
12 | Gentoo uses a special initscript format which, amongst other features, allows |
| 13 | dependency-driven decisions and virtual initscripts. This chapter explains all |
13 | dependency-driven decisions and virtual initscripts. This chapter explains all |
| 14 | these aspects and explains how to deal with these scripts. |
14 | these aspects and explains how to deal with these scripts. |
| 15 | </abstract> |
15 | </abstract> |
| 16 | |
16 | |
| 17 | <version>6</version> |
17 | <version>7</version> |
| 18 | <date>2012-07-24</date> |
18 | <date>2012-10-31</date> |
| 19 | |
19 | |
| 20 | <section> |
20 | <section> |
| 21 | <title>Runlevels</title> |
21 | <title>Runlevels</title> |
| 22 | <subsection> |
22 | <subsection> |
| 23 | <title>Booting your System</title> |
23 | <title>Booting your System</title> |
| … | |
… | |
| 701 | <pre caption="Getting the man page for start-stop-daemon"> |
701 | <pre caption="Getting the man page for start-stop-daemon"> |
| 702 | $ <i>man start-stop-daemon</i> |
702 | $ <i>man start-stop-daemon</i> |
| 703 | </pre> |
703 | </pre> |
| 704 | |
704 | |
| 705 | <p> |
705 | <p> |
| 706 | Gentoo's init script syntax is based on the Bourne Again Shell (bash) so you are |
706 | Gentoo's init script syntax is based on the POSIX Shell so you are |
| 707 | free to use bash-compatible constructs inside your init script. However, you may |
707 | free to use sh-compatible constructs inside your init script. Keep other |
| 708 | want to write your init scripts to be POSIX-compliant. Future init script |
708 | constructs, like bash-specific ones, out of the init scripts to ensure that the |
| 709 | systems may allow symlinking <path>/bin/sh</path> to other shells besides |
709 | scripts remain functional regardless of the change Gentoo might do on its init |
| 710 | bash. Init scripts that rely on bash-only features will then break these |
710 | system. |
| 711 | configurations. |
|
|
| 712 | </p> |
711 | </p> |
| 713 | |
712 | |
| 714 | </body> |
713 | </body> |
| 715 | </subsection> |
714 | </subsection> |
| 716 | <subsection> |
715 | <subsection> |