diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-08-29 20:25:40 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-08-29 20:25:40 +0000 |
commit | ee111aabf49128fe88968f658b0f4b683a3caa00 (patch) | |
tree | 4e62e9b5728eb711ff48d8ff017ab48aeb6f9775 /doc | |
parent | 381b64487199a9edd46e84f7ff134722c3c3bcfc (diff) | |
download | s6-rc-ee111aabf49128fe88968f658b0f4b683a3caa00.tar.xz |
- some work on s6-rc-update
- add s6-rc-bundle and relevant doc
Diffstat (limited to 'doc')
-rw-r--r-- | doc/faq.html | 6 | ||||
-rw-r--r-- | doc/index.html | 2 | ||||
-rw-r--r-- | doc/overview.html | 10 | ||||
-rw-r--r-- | doc/s6-rc-bundle.html | 132 |
4 files changed, 149 insertions, 1 deletions
diff --git a/doc/faq.html b/doc/faq.html index 4776b00..2fe7acd 100644 --- a/doc/faq.html +++ b/doc/faq.html @@ -196,10 +196,14 @@ you don't want up anymore: <tt>s6-rc -p change runlevel-2</tt>. <p> Bundles are easy to use, they're flexible, and they're powerful. They give you the same level of functionality as runlevels would, and more. +You can even add bundles to compiled service databases - including the +live one - or remove bundles from them without having to recompile them: +that's what the <a href="s6-rc-bundle.html">s6-rc-bundle</a> utility is +for. </p> <p> - Use bundles. + When in doubt, use bundles. </p> </body> diff --git a/doc/index.html b/doc/index.html index 6c893c1..3e66a90 100644 --- a/doc/index.html +++ b/doc/index.html @@ -35,6 +35,7 @@ scripts are also run in a controlled environment. <ul> <li> <a href="why.html">Why</a> such a program ? </li> <li> A <a href="overview.html">high-level overview</a> of s6-rc </li> + <li> <a href="faq.html">FAQ</a> for s6-rc </li> </ul> <hr /> @@ -97,6 +98,7 @@ the previous versions of s6-rc and the current one. </li> <ul> <li> <a href="s6-rc-compile.html">The <tt>s6-rc-compile</tt> program</a> </li> <li> <a href="s6-rc-db.html">The <tt>s6-rc-db</tt> program</a> </li> + <li> <a href="s6-rc-bundle.html">The <tt>s6-rc-bundle</tt> program</a> </li> </ul> <h4> Online tools: managing your live services </h4> diff --git a/doc/overview.html b/doc/overview.html index 2a90ee6..0d8dce0 100644 --- a/doc/overview.html +++ b/doc/overview.html @@ -217,5 +217,15 @@ provided in the packages, an invocation of keep the live state up to date. </p> +<h2> Live bundle modifications </h2> + +<p> + It is possible to change bundle definitions in a compiled service +database, including the live one, without recompiling everything by +calling <a href="s6-rc-compile.html">s6-rc-compile</a>. The +<a href="s6-rc-bundle.html">s6-rc-bundle</a> tool can edit compiled +databases to add bundles to them, or delete bundles from them. +</p> + </body> </html> diff --git a/doc/s6-rc-bundle.html b/doc/s6-rc-bundle.html new file mode 100644 index 0000000..c77f890 --- /dev/null +++ b/doc/s6-rc-bundle.html @@ -0,0 +1,132 @@ +<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-bundle program</title> + <meta name="Description" content="s6-rc: the s6-rc-bundle program" /> + <meta name="Keywords" content="s6-rc offline database dump command rc init dependency state management services" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-rc-bundle</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The s6-rc-bundle program </h1> + +<p> + s6-rc-bundle is a tool to add or delete bundles from a compiled +service database without having to recompile it from source. +</p> + +<p> + It is an <em>offline tool</em>, i.e. you can run it on any +compiled service database without actually having a live set +of services managed by s6-rc. However, if you do have a live +set, you can still run s6-rc-bundle on the current database (and +it is the default); it won't interfere with your normal service +operation. +</p> + +<h2> Interface </h2> + +<pre> + s6-rc-bundle help + s6-rc-bundle [ -f ] [ -l <em>live</em> ] [ -c <em>compiled</em> ] add <em>bundlename</em> <em>contents...</em> + s6-rc-bundle [ -f ] [ -l <em>live</em> ] [ -c <em>compiled</em> ] delete <em>bundlenames...</em> + s6-rc-bundle [ -f ] [ -l <em>live</em> ] [ -c <em>compiled</em> ] multiple <em>args...</em> +</pre> + +<ul> + <li> s6-rc-bundle expects to find a <em>compiled service database</em> +in <em>compiled</em>; by default it uses the service database +used by the live state in <em>live</em>. </li> + <li> Depending on the arguments, it adds a bundle definition to this database, or +deletes a bundle definition from it, or performs multiple additions/deletions. </li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-c <em>compiled</em></tt> : operate on a +compiled service database in <em>compiled</em> instead of +the current live one. </li> + <li> <tt>-l <em>live</em></tt> : assume the live +state is in <em>live</em>. This option is ignored if the +<tt>-c</tt> option has been given. Default is +<tt>/run/s6-rc</tt>. The default can be changed at package +compilation time, by giving the <tt>--livedir=<em>live</em></tt> +option to <tt>./configure</tt>. </li> + <li> <tt>-f</tt> : force. s6-rc-bundle will not complain +when given a nonexisting name to delete (it will do nothing), or +when given an existing name to add (it will replace the definition). +By default, s6-rc-bundle will exit when asked to delete a +nonexistent name or to add an existing name. </li> +</ul> + +<h2> Exit codes </h2> + +<ul> + <li> 0: success </li> + <li> 1: identifier already exists in service database </li> + <li> 3: identifier not found in service database </li> + <li> 4: invalid or corrupted service database </li> + <li> 5: wrong identifier type for the given command </li> + <li> 100: wrong usage </li> + <li> 111: system call failed </li> +</ul> + +<h2> Subcommands </h2> + +<h3> s6-rc-bundle help </h3> + +<p> + Prints a help message on stdout. +</p> + +<h3> s6-rc-bundle add <em>bundlename</em> <em>contents...</em> </h3> + +<p> + Adds a bundle named <em>bundlename</em> to the database, representing +the services listed in <em>contents</em>. The arguments in <em>contents...</em> +are resolved <em>before</em> the database is modified by the +s6-rc-bundle invocation. +</p> + +<h3> s6-rc-bundle delete <em>bundlenames...</em> </h3> + +<p> + Deletes bundles listed in <em>bundlenames...</em>. +</p> + +<h3> s6-rc-bundle multiple <em>args...</em> </h3> + +<p> + Performs multiple bundle deletions and additions. This subcommand is best +used in an <a href="http://skarnet.org/software/execline/">execline</a> +script, because it uses +<a href="http://skarnet.org/software/execline/el_semicolon.html">blocks</a>. +</p> + +<p> +<em>args...</em> is composed of: +</p> + +<ul> + <li> One block listing bundle names that will be +deleted from the database. </li> + <li> Zero or more addition definitions, each of them composed of: + <ul> + <li> One argument that is the name of the bundle to add </li> + <li> One block listing the services contained in the +new bundle. The names in the block are resolved before any addition +is made to the database. </li> + </ul> </li> +</ul> + +</body> +</html> |