summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--INSTALL2
-rw-r--r--NEWS3
-rw-r--r--doc/index.html4
-rw-r--r--doc/s6-rc.html25
-rw-r--r--doc/upgrade.html4
-rw-r--r--package/info2
-rw-r--r--src/s6-rc/s6-rc.c10
8 files changed, 42 insertions, 9 deletions
diff --git a/AUTHORS b/AUTHORS
index c515056..cc5acb0 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -19,3 +19,4 @@ Thanks to:
Guillermo <gdiazhartusch@gmail.com>
Josuah Demangeon <mail@josuah.net>
Dudemanguy@artixlinux.org
+ Hugo O. Barrera <hugo@whynothugo.nl>
diff --git a/INSTALL b/INSTALL
index 5a76e96..1062599 100644
--- a/INSTALL
+++ b/INSTALL
@@ -7,7 +7,7 @@ Build Instructions
- A POSIX-compliant C development environment
- GNU make version 3.81 or later
- skalibs version 2.13.1.0 or later: https://skarnet.org/software/skalibs/
- - execline version 2.9.1.0 or later: https://skarnet.org/software/execline/
+ - execline version 2.9.2.0 or later: https://skarnet.org/software/execline/
- s6 version 2.11.3.0 or later: https://skarnet.org/software/s6/
This software will run on any operating system that implements
diff --git a/NEWS b/NEWS
index aef49aa..e799493 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,10 @@
Changelog for s6-rc.
-In 0.5.3.4
+In 0.5.4.0
----------
- Bugfixes.
+ - New s6-rc commands: start (-u change) and stop (-d change).
In 0.5.3.3
diff --git a/doc/index.html b/doc/index.html
index 582a506..7bd994d 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -51,7 +51,7 @@ scripts are also run in a controlled environment.
2.13.1.0 or later. It's a build-time requirement. It's also a run-time
requirement if you link against the shared version of the skalibs library. </li>
<li> <a href="//skarnet.org/software/execline/">execline</a> version
-2.9.1.0 or later. It's a build-time <em>and</em> run-time requirement. </li>
+2.9.2.0 or later. It's a build-time <em>and</em> run-time requirement. </li>
<li> <a href="//skarnet.org/software/s6/">s6</a> version
2.11.3.0 or later. It's a build-time <em>and</em> run-time requirement. </li>
</ul>
@@ -67,7 +67,7 @@ requirement if you link against the shared version of the skalibs library. </li>
<ul>
<li> The current released version of s6-rc is
-<a href="s6-rc-0.5.3.4.tar.gz">0.5.3.4</a>. </li>
+<a href="s6-rc-0.5.4.0.tar.gz">0.5.4.0</a>. </li>
<li> Alternatively, you can checkout a copy of the
<a href="//git.skarnet.org/cgi-bin/cgit.cgi/s6-rc/">s6-rc
git repository</a>:
diff --git a/doc/s6-rc.html b/doc/s6-rc.html
index bccc1b5..d5013c4 100644
--- a/doc/s6-rc.html
+++ b/doc/s6-rc.html
@@ -220,6 +220,20 @@ a permanent failure - which means its
stopped trying to bring it back up.
</p>
+<h3> s6-rc start </h3>
+
+<p>
+ <tt>s6-rc start</tt> is equivalent to <tt>s6-rc -u change</tt>, see
+below. It will run the engine to start a set of services.
+</p>
+
+<h3> s6-rc stop </h3>
+
+<p>
+ <tt>s6-rc stop</tt> is equivalent to <tt>s6-rc -d change</tt>, see
+below. It will run the engine to stop a set of services.
+</p>
+
<h3> s6-rc change </h3>
<p>
@@ -235,7 +249,12 @@ machine to a state where:
</ul>
<p>
- To do so:
+ (Note that the <tt>-p</tt> option is inoperant when using the <tt>start</tt>
+or <tt>stop</tt> subcommands.)
+</p>
+
+<p>
+ To change the machine state, s6-rc does the following:
</p>
<ul>
@@ -388,13 +407,13 @@ oneshot service is in. </li>
<h2> Usage examples </h2>
-<pre> s6-rc change <em>myservicebundle</em> </pre>
+<pre> s6-rc start <em>myservicebundle</em> </pre>
<p>
Brings up all the services represented by <em>myservicebundle</em>,
bringing up all its dependencies first (recursively).
</p>
-<pre> s6-rc -bad change </pre>
+<pre> s6-rc -ba down </pre>
<p>
Waits for any pending program of the s6-rc family to stop using
the live database and current compiled service database, then
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 348fef0..13bfad5 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -30,11 +30,13 @@ minor and bugfix version changes.
<h1> What has changed in s6-rc </h1>
-<h2> in 0.5.3.4 </h2>
+<h2> in 0.5.4.0 </h2>
<ul>
<li> <a href="//skarnet.org/software/skalibs/">skalibs</a>
dependency bumped to 2.13.1.0. </li>
+ <li> <a href="//skarnet.org/software/execline/">execline</a>
+dependency bumped to 2.9.2.0. </li>
<li> <a href="//skarnet.org/software/s6/">s6</a>
dependency bumped to 2.11.3.0. </li>
</ul>
diff --git a/package/info b/package/info
index d2105ab..431056e 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=s6-rc
-version=0.5.3.4
+version=0.5.4.0
category=admin
package_macro_name=S6RC
diff --git a/src/s6-rc/s6-rc.c b/src/s6-rc/s6-rc.c
index 0a14c32..2b13e8f 100644
--- a/src/s6-rc/s6-rc.c
+++ b/src/s6-rc/s6-rc.c
@@ -442,6 +442,8 @@ static inline unsigned int parse_command (char const *command)
"listall",
"diff",
"change",
+ "start",
+ "stop",
0
} ;
unsigned int i = lookup(command_table, command) ;
@@ -506,6 +508,14 @@ int main (int argc, char const *const *argv)
print_help() ;
return 0 ;
}
+ if (what == 5)
+ {
+ what = 4 ; up = 1 ; prune = 0 ;
+ }
+ else if (what == 6)
+ {
+ what = 4 ; up = 0 ; prune = 0 ;
+ }
livelen = strlen(live) ;