diff options
| author | PS <p@0x53.net> | 2026-02-07 10:37:36 +0100 |
|---|---|---|
| committer | PS <p@0x53.net> | 2026-02-07 10:37:36 +0100 |
| commit | 02a071125de739ed54660ad014ffd57c42516abf (patch) | |
| tree | 719d4127af9dc8dfa854042be8b47d3bf7356ef7 /doc/bin/system-init.html | |
| parent | 291a2d0ad47d29d7f4e83da47efb3a125f3667fc (diff) | |
| download | goetia-linux-init-02a071125de739ed54660ad014ffd57c42516abf.tar.gz goetia-linux-init-02a071125de739ed54660ad014ffd57c42516abf.tar.bz2 goetia-linux-init-02a071125de739ed54660ad014ffd57c42516abf.zip | |
Add doc
Diffstat (limited to 'doc/bin/system-init.html')
| -rw-r--r-- | doc/bin/system-init.html | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/doc/bin/system-init.html b/doc/bin/system-init.html new file mode 100644 index 0000000..7b3df53 --- /dev/null +++ b/doc/bin/system-init.html @@ -0,0 +1,132 @@ +<!DOCTYPE html> +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>system-init</title> + <meta name="Description" content="Init script for Linux." /> + <meta name="Keywords" content="goetia s6 s6-rc Linux" /> + </head> + <header> + <p> + <a href="//0x53.net/software/goetia/goetia-linux-init">goetia-linux-init</a> + <br /> + <a href="//0x53.net/software/goetia">goetia</a> + <br /> + <a href="//0x53.net/software">Software</a> + <br /> + <a href="//0x53.net">0x53.net</a> + </p> + </header> + <body> + <h1>The system-init program</h1> + <p> + system-init is a minimal, scripted init to bring up a goetia based system. + </p> + <h2>Interface</h2> + <pre> system-init</pre> + <ul> + <li> + system-init takes no arguments. + </li> + <li> + It makes <code>/dev/console</code> its stdout and stderr. + </li> + <li> + It reads the environment variable <code>BUNDLE</code>, + which can be specified on the Kernel command line. + If it is undefined, it uses <code>default</code> as the value. + </li> + <li> + It reads the environment variable <code>PATH</code>, + which can be specified on the Kernel command line. + If it is undefined, it uses + <code>/command:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/libexec:/usr/local/libexec</code> + as the value. + </li> + <li> + It sets the <code>PATH</code> environment variable to the value + chosen above. + </li> + <li> + It chdirs to <code>/</code>. + </li> + <li> + It runs <code><a href="https://skarnet.org/software/s6/s6-setsid.html">s6-setsid</a></code> + to become the session leader. + </li> + <li> + It creates the + <a href="//0x53.net/software/goetia/rundir.html">runtime directory</a> + if it does not already exist. + </li> + <li> + It mounts the + <a href="//0x53.net/software/goetia/rundir.html">runtime directory</a> + tmpfs. + </li> + <li> + It copies the old system logs from the + <code>uncaught-logs/</code> + subdirectory of the + <a href="//0x53.net/software/goetia/logdir.html#system">system log directory</a> + to the + <code>log/</code> + subdirectory of the + <a href="//0x53.net/software/goetia/rundir.html#system">system runtime directory</a> + if they exist. + </li> + <li> + It runs + <code><a href="./prepare-svscan.html">prepare-svscan</a></code> + with the proper arguments. + </li> + <li> + Finally, it executes into + <code><a href="https://skarnet.org/software/s6/s6-svscan.html">s6-svscan</a></code> + on the scandir represented by the + <code>service/</code> + subdirectory of the + <a href="//0x53.net/software/goetia/rundir.html#system">system runtime directory</a>. + </li> + </ul> + <h2>Exit codes</h2> + <ul> + <li> + system-init usually executes into + <a href="https://skarnet.org/software/s6/s6-svscan.html">s6-svscan</a> + which exits according to its page. + </li> + <li> + Since system-init is an + <a href="https://skarnet.org/software/execline/">execline</a> + script, it exits with an approximation + of employed program that failed. + </li> + <li> + system-init mostly uses + <a href="https://skarnet.org/software/execline/">execline</a> + and + <a href="https://skarnet.org/software/s6/">s6</a> + software, the exit behaviour of which can be looked up on + their respective pages. + </li> + <li> + See also: + <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>. + </li> + </ul> + <h2>Options</h2> + <ul> + <li> + There are no options to system-init. + </li> + </ul> + <h2>Notes</h2> + <p> + system-init is primarily intended to be used + as an init for an acutal boot process, not for containers. + </p> + </body> +</html> |
