aboutsummaryrefslogtreecommitdiffstats
path: root/doc/s6-rc-set-change.html
blob: e731379075853d39dbc465b7ca0aacfbc4f807ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="color-scheme" content="dark light" />
    <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 rx 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#rx">rx</a> of some services.
</p>

<h2> Interface </h2>

<pre>
     s6-rc-set-change [ -v <em>verbosity</em> ] [ -r <em>repo</em> ] [ -E | -e ] [ -n ] [ -f ] [ -I | -i ] [ -P | -p ] <em>set</em> <em>newrx</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#rx">rx</a> <em>newrx</em>. </li>
 <li> It exits 0. </li>
</ul>

<h2> Options </h2>

<dl>
 <dt> <tt>-v <em>verbosity</em></tt>, <tt>--verbosity=<em>verbosity</em></tt> </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> <tt>-r <em>repo</em></tt>, <tt>--repository=<em>repo</em></tt> </dt>
 <dd> Use the repository in <em>repo</em>, which must exist. Default is
<strong>/var/lib/s6-rc/repository</strong>.
 </dd>

 <dt> <tt>-E</tt>, <tt>--no-force-essential</tt> </dt>
 <dd> If a service needs to be moved to/from the <tt>always</tt> rx, fail and report
an error. This is the default. Services marked as <em>always</em> are normally defined
in the stores with <tt>flag-essential</tt>, and inconsistencies between essential
services should be resolved in the stores. </dd>

 <dt> <tt>-e</tt>, <tt>--force-essential</tt> </dt>
 <dd> Move services to/from the <tt>always</tt> rx if they need to be. This option
should only be used temporarily until the store inconsistency is fixed. Be aware that
moving a service from <em>always</em> to <em>usable</em> or <em>masked</em> may
result in an unbootable set. </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>

 <dt> <tt>-I</tt>, <tt>--no-fail-on-dependencies</tt> </dt>
 <dd> Do not fail if a dependency is found. Depending on the <tt>-P</tt> or <tt>-p</tt>
flag, either print a warning message and proceed to make an inconsistent set, or pull the
dependency into the change. This is the default. </dd>

 <dt> <tt>-i</tt>, <tt>--fail-on-dependencies</tt> </dt>
 <dd> If a dependency is found that would create an inconsistent set if the change was
applied, print an error message and exit 1. </dd>

 <dt> <tt>-P</tt>, <tt>--no-pull-dependencies</tt> </dt>
 <dd> If a dependency is found that would create an inconsistent set if the change was
applied, print a warning message (if verbosity is not 0) listing the services that
also need to change prescriptions; then apply the change anyway. This is the default. </dd>

 <dt> <tt>-p</tt>, <tt>--pull-dependencies</tt> </dt>
 <dd> If a dependency is found that would create an inconsistent set, automatically
extend the change to the dependencies as well so the set remain consistent. Print an
informational message (if verbosity is 2 or more) listing the services that are being
pulled into the change, then apply the change. </dd>
</dl>

<h2> Exit codes </h2>

<dl>
 <dt> 0 </dt> <dd> Success. </dd>
 <dt> 1 </dt> <dd> The <tt>-I</tt> option was given and dependencies prevented <em>services...</em>
from being changed to <em>newrx</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 can be <a href="s6-rc-set-commit">committed</a>. </li>
 <li> If you are masking or unmasking services, and you see it pulling services that
are not dependencies of the service you're unmasking or are not depending on the service
you're masking, it is because these services are part of the same pipeline. If you mask
a part of a pipeline, the whole pipeline needs to be masked. </li>
</ul>

</body>
</html>