aboutsummaryrefslogtreecommitdiffstats
path: root/doc/s6-rc-set-change.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/s6-rc-set-change.html')
-rw-r--r--doc/s6-rc-set-change.html105
1 files changed, 105 insertions, 0 deletions
diff --git a/doc/s6-rc-set-change.html b/doc/s6-rc-set-change.html
new file mode 100644
index 0000000..5a0d41b
--- /dev/null
+++ b/doc/s6-rc-set-change.html
@@ -0,0 +1,105 @@
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>s6-rc: the s6-rc-set-change program</title>
+ <meta name="Description" content="s6-rc: the s6-rc-set-change program" />
+ <meta name="Keywords" content="s6-rc s6-rc-set-change repo set sub change services" />
+ <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
+ </head>
+<body>
+
+<p>
+<a href="index.html">s6-rc</a><br />
+<a href="//skarnet.org/software/">Software</a><br />
+<a href="//skarnet.org/">skarnet.org</a>
+</p>
+
+<h1> The s6-rc-set-change program </h1>
+
+<p>
+ s6-rc-set-change modifies a <a href="repodefs.html#set">set</a> by changing
+the <a href="repodefs.html#sub">sub</a> of some services.
+</p>
+
+<h2> Interface </h2>
+
+<pre>
+ s6-rc-set-change [ -v <em>verbosity</em> ] [ -r <em>repo</em> ] [ -E ] [ -f | -I fail|pull|warn ] [ -n ] <em>set</em> <em>newsub</em> <em>services...</em>
+</pre>
+
+<ul>
+ <li> s6-rc-set-change operates on <a href="repodefs.html#set">set</a> <em>set</em> in <a href="repodefs.html#repository">repository</a> <em>repo</em>. </li>
+ <li> It attempts to move all the services listed in <em>services...</em> into <a href="repodefs.html#sub">sub</a> <em>newsub</em>. </li>
+ <li> It exits 0. </li>
+</ul>
+
+<h2> Options </h2>
+
+<dl>
+ <dt> -v <em>verbosity</em>, --verbosity=<em>verbosity</em> </dt>
+ <dd> Be more or less verbose. The default is <strong>1</strong>, which means
+that error messages and warnings will be written to stderr. 0 means that only
+error messages will be written, and 2 or more adds informational messages. </dd>
+
+ <dt> -r <em>repo</em>, --repository=<em>repo</em> </dt>
+ <dd> Use the repository in <em>repo</em>, which must exist. Default is
+<strong>/var/lib/s6-rc/repository</strong>.
+ </dd>
+
+ <dt> -E, --force-essential </dt>
+ <dd> This option is necessary in order if <em>newsub</em> is <tt>always</tt>.
+Without that option, s6-rc-set-change refuses to set services to <tt>always</tt>. </dd>
+
+ <dt> -f, --ignore-dependencies </dt>
+ <dd> Change <em>services...</em> to <em>newsub</em>, but do not change any other
+services, even if the dependency graph would normally mandate it. This may result
+in an inconsistent set that you cannot commit. </dd>
+</dl>
+
+ <dt> -I <em>action</em>, --if-dependencies-found=<em>action</em> </dt>
+ <dd> Determine what to do if a dependency would make the set inconsistent.
+For instance, if service <tt>A</tt> depends on service <tt>B</tt>, they are both
+in the <tt>latent</tt> sub, and you are trying to change <tt>A</tt> to <tt>active</tt>
+without mentioning <tt>B</tt>, this would not work: in order to be brought up at
+boot time, <tt>A</tt> would first need <tt>B</tt> to also be brought up at boot time,
+so <tt>A</tt> can only be <tt>active</tt> if <tt>B</tt> also is. In that situation,
+what s6-rc-set-change does depends on the value of <em>action</em>:
+ <ul>
+ <li> <tt>fail</tt>: print an error message and exit 1. </li>
+ <li> <tt>warn</tt>: print a warning message and proceed. This is the default. </li>
+ <li> <tt>pull</tt>: print a warning message and pull the dependencies of
+<em>services...</em> into <em>newsub</tt>. (Or the reverse dependencies, if
+you're trying to disable or mask services. </li>
+ </ul>
+ The warning messages are not printed if <em>verbosity</em> is 0. </dd>
+
+ <dt> -n, --dry-run </dt>
+ <dd> Check whether the command would succeed, print warning or error messages if
+appropriate, but do not perform the actual modifications. </dd>
+
+<h2> Exit codes </h2>
+
+<dl>
+ <dt> 0 </dt> <dd> Success. </dd>
+ <dt> 1 </dt> <dd> <tt>-I fail</tt> was given and dependencies prevented <em>services...</em>
+from being changed to <em>newsub</em>. </dd>
+ <dt> 3 </dt> <dd> A service in <em>services...</em> was not found in the reference database. </dt>
+ <dt> 4 </dt> <dd> Invalid or corrupted reference database. </dd>
+ <dt> 100 </dt> <dd> Incorrect usage. </dd>
+ <dt> 102 </dt> <dd> Inconsistent repository. </dd>
+ <dt> 111 </dt> <dd> System call failed. </dd>
+</dl>
+
+<h2> Notes </h2>
+
+<ul>
+ <li> s6-rc-set-change is the bread and butter of <em>repo</em> operations. It is how users
+can tailor the set of services they want to be enabled at boot time. </li>
+ <li> Once a change has been effected, and the command says that the set is consistent,
+it needs to be <a href="s6-rc-set-commit">committed</a>. </li>
+</ul>
+
+</body>
+</html>