From 07a5243d8a78dddac98040741cd204f382f6012e Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 14 Feb 2023 10:41:44 +0000 Subject: Prepare for 0.5.4.0; add start and stop subcommands to s6-rc Signed-off-by: Laurent Bercot --- AUTHORS | 1 + INSTALL | 2 +- NEWS | 3 ++- doc/index.html | 4 ++-- doc/s6-rc.html | 25 ++++++++++++++++++++++--- doc/upgrade.html | 4 +++- package/info | 2 +- src/s6-rc/s6-rc.c | 10 ++++++++++ 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 Josuah Demangeon Dudemanguy@artixlinux.org + Hugo O. Barrera 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.
  • execline version -2.9.1.0 or later. It's a build-time and run-time requirement.
  • +2.9.2.0 or later. It's a build-time and run-time requirement.
  • s6 version 2.11.3.0 or later. It's a build-time and run-time requirement.
  • @@ -67,7 +67,7 @@ requirement if you link against the shared version of the skalibs library.
    • The current released version of s6-rc is -0.5.3.4.
    • +0.5.4.0.
    • Alternatively, you can checkout a copy of the s6-rc git repository: 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.

      +

      s6-rc start

      + +

      + s6-rc start is equivalent to s6-rc -u change, see +below. It will run the engine to start a set of services. +

      + +

      s6-rc stop

      + +

      + s6-rc stop is equivalent to s6-rc -d change, see +below. It will run the engine to stop a set of services. +

      +

      s6-rc change

      @@ -235,7 +249,12 @@ machine to a state where:

    - To do so: + (Note that the -p option is inoperant when using the start +or stop subcommands.) +

    + +

    + To change the machine state, s6-rc does the following:

      @@ -388,13 +407,13 @@ oneshot service is in.

      Usage examples

      -
       s6-rc change myservicebundle 
      +
       s6-rc start myservicebundle 

      Brings up all the services represented by myservicebundle, bringing up all its dependencies first (recursively).

      -
       s6-rc -bad change 
      +
       s6-rc -ba down 

      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.

      What has changed in s6-rc

      -

      in 0.5.3.4

      +

      in 0.5.4.0

      • skalibs dependency bumped to 2.13.1.0.
      • +
      • execline +dependency bumped to 2.9.2.0.
      • s6 dependency bumped to 2.11.3.0.
      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) ; -- cgit v1.2.3