diff options
| author | PS <p@0x53.net> | 2026-02-07 10:20:30 +0100 |
|---|---|---|
| committer | PS <p@0x53.net> | 2026-02-07 10:20:30 +0100 |
| commit | 5e95d487982b9362b544139b98d1da55fa6ef78c (patch) | |
| tree | 1abf6d91f9e6d0b6d0ac7b7d759663f2531eb51b /doc/bin/user-init.html | |
| parent | f7df2f7bb6abbea365cccb1345dcf1a1b7a80797 (diff) | |
| download | goetia-base-5e95d487982b9362b544139b98d1da55fa6ef78c.tar.gz goetia-base-5e95d487982b9362b544139b98d1da55fa6ef78c.tar.bz2 goetia-base-5e95d487982b9362b544139b98d1da55fa6ef78c.zip | |
Add doc
Diffstat (limited to 'doc/bin/user-init.html')
| -rw-r--r-- | doc/bin/user-init.html | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/doc/bin/user-init.html b/doc/bin/user-init.html new file mode 100644 index 0000000..c96c3ae --- /dev/null +++ b/doc/bin/user-init.html @@ -0,0 +1,128 @@ +<!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>user-init</title> + <meta name="Description" content="Script to initialize a user supervision tree." /> + <meta name="Keywords" content="goetia prepare-svscan s6 s6-rc user supervision tree" /> + </head> + <header> + <p> + <a href="//0x53.net/software/goetia/goetia-base">goetia-base</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 user-init program</h1> + <p> + user-init starts a user supervision tree for + the user defined in the <code>USER</code> + environment variable. + </p> + <h2>Interface</h2> + <pre> user-init</pre> + <ul> + <li> + user-init takes no arguments. + </li> + <li> + It reads the <code>USER</code> environment variable, + if it is empty it exits 100. + </li> + <li> + It reads the <code>USERTREE</code> environment variable, + if it is empty it exits 100. + </li> + <li> + It reads the <code>BUNDLE</code> environment variable, + defaulting to <code>default</code> if empty. + </li> + <li> + It reads the <code>PATH</code> environment variable, + defaulting to + <code>/command:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/libexec:/usr/local/libexec</code> + if empty. + </li> + <li> + if <code>${USER}/${USERTREE}</code> subdirectory of the + <a href="//0x53.net/software/goetia/rundir.html">runtime directory</a> + olready existis, it exits 100. + </li> + <li> + It sets the <code>HOME</code> environment variable based on the result of + <a href="https://skarnet.org/software/execline/homeof.html">homeof</a>. + </li> + <li> + It prepends <code>${HOME}/.local/bin:</code> to the <code>PATH</code> + environment variable. + </li> + <li> + It sets the <code>UID</code>, <code>GID</code> and <code>GIDLIST</code> + environment variables using + <a href="https://skarnet.org/software/s6/s6-envuidgid.html">s6-envuidgid</a>. + </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>${USER}/${USERTREE}/service</code> + subdirectory of the + <a href="//0x53.net/software/goetia/rundir.html#user">user runtime directory</a>. + </li> + </ul> + <h2>Exit codes</h2> + <ul> + <li> + 100 if a critical environment variable is missing. + </li> + <li> + user-init usually executes into + <a href="https://skarnet.org/software/s6/s6-svscan.html">s6-svscan</a> + which exits according to its documentation. + </li> + <li> + Since user-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> + user-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 documentation. + </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 otions to user-init. + </li> + </ul> + <h2>Notes</h2> + <p> + More information about user supervision trees + themselves can be found on the + <a href="//0x53.net/software/goetia/supervisiontree.html#user">user supervision tree</a> + page. + </p> + </body> +</html> |
