aboutsummaryrefslogtreecommitdiffstats
path: root/doc/bin/user-tmpfs.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/bin/user-tmpfs.html')
-rw-r--r--doc/bin/user-tmpfs.html104
1 files changed, 104 insertions, 0 deletions
diff --git a/doc/bin/user-tmpfs.html b/doc/bin/user-tmpfs.html
new file mode 100644
index 0000000..3c22c57
--- /dev/null
+++ b/doc/bin/user-tmpfs.html
@@ -0,0 +1,104 @@
+<!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-tmpfs</title>
+ <meta name="Description" content="Script to prepare a user owned tmpfs to house a user supervision tree." />
+ <meta name="Keywords" content="goetia tmpfs 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-tmpfs program</h1>
+ <p>
+ The user-tmpfs program prepares
+ a user owned tmpfs for
+ the user defined in the <code>USER</code>
+ environment variable.
+ The user owned tmpfs is created at
+ <code><var>@tmpfsdir@</var>/<var>@usrrundir@</var>/<var>${USER}</var></code>.
+ </p>
+ <h2>Interface</h2>
+ <pre> user-tmpfs</pre>
+ <ul>
+ <li>
+ user-tmpfs 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>USER_TMPFSDIR_SIZE</code> environment variable,
+ defaulting to <code>64m</code> if undefined.
+ </li>
+ <li>
+ It creates the directory
+ <code><var>@tmpfsdir@</var>/<var>@usrrundir@</var>/<var>${USER}</var></code>.
+ </li>
+ <li>
+ It mounts a tmpfs
+ of size <code>USER_TMPFSDIR_SIZE</code>
+ with its root owned bi <code>USER</code>
+ and mode <code>0755</code>
+ at <code><var>@tmpfsdir@</var>/<var>@usrrundir@</var>/<var>${USER}</var></code>.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 100 if a critical environment variable is missing.
+ </li>
+ <li>
+ Since user-tmpfs 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-tmpfs 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-tmpfs.
+ </li>
+ </ul>
+ <h2>Notes</h2>
+ <p>
+ user-tmpfs is intended to be used in a boot time
+ <a href="//0x53.net/software/goetia/supervisiontree.html#system">system supervision tree</a>
+ oneshot service to prepare the
+ <a href="//0x53.net/software/goetia/rundir.html#user">user runtime directory</a>
+ of a user.
+ For each user who should have a user runtime directory,
+ there should be a distinct oneshot running user-tmpfs.
+ </p>
+ <p>
+ Alternatively, user-tmpfs could be run by a login manager
+ after login, but befor initiating the first
+ <a href="//0x53.net/software/goetia/supervisiontree.html#user">user supervision tree</a>.
+ </p>
+ </body>
+</html>