diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-09-22 16:53:50 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-09-22 16:53:50 +0000 |
commit | 2230676c105e369df568474ed81b2360c7833581 (patch) | |
tree | 41c862da29d7fad238359e7011d9197ba0cef035 | |
parent | 6045e95e3633af28e9b76bff260abe10741b33c8 (diff) | |
download | s6-rc-2230676c105e369df568474ed81b2360c7833581.tar.xz |
Add S6RC_EXTLIBEXECPREFIX, use it in s6-rc-compile. Databases should work
across s6-rc versions!
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | doc/s6-rc-update.html | 6 | ||||
-rw-r--r-- | src/s6-rc/s6-rc-compile.c | 4 | ||||
-rw-r--r-- | src/s6-rc/s6-rc.c | 7 |
4 files changed, 16 insertions, 3 deletions
@@ -410,10 +410,12 @@ if $slashpackage ; then echo "#define ${package_macro_name}_BINPREFIX \"$binprefix/\"" echo "#define ${package_macro_name}_EXTBINPREFIX \"$extbinprefix/\"" echo "#define ${package_macro_name}_LIBEXECPREFIX \"$binprefix/\"" + echo "#define ${package_macro_name}_EXTLIBEXECPREFIX \"$extbinprefix/\"" else echo "#define ${package_macro_name}_BINPREFIX \"\"" echo "#define ${package_macro_name}_EXTBINPREFIX \"\"" echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\"" + echo "#define ${package_macro_name}_EXTLIBEXECPREFIX \"$libexecdir/\"" fi echo echo "#endif" diff --git a/doc/s6-rc-update.html b/doc/s6-rc-update.html index 965cc70..fc049b4 100644 --- a/doc/s6-rc-update.html +++ b/doc/s6-rc-update.html @@ -248,6 +248,12 @@ restart. </li> <h2> Notes </h2> <ul> + <li> The <em>live</em> argument to the <tt>-l</tt> option, if present, should +be the same argument that was given to the +<a href="s6-rc-init.html">s6-rc-init</a> invocation when the system was +booted. In other words: it should be the name of the symbolic link pointing +to the real directory containing the live information, not the name of the +real directory. </li> <li> The old compiled service database is left unchanged, and the new compiled service database is used in-place. If the machine is rebooted, the <a href="s6-rc-init.html">s6-rc-init</a> invocation will still boot on the diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c index b1b4808..4d5230f 100644 --- a/src/s6-rc/s6-rc-compile.c +++ b/src/s6-rc/s6-rc-compile.c @@ -44,7 +44,7 @@ S6_EXTBINPREFIX "s6-ipcserver-access -v0 -E -l0 -i data/rules --\n" \ EXECLINE_EXTBINPREFIX "getcwd WD\n" \ EXECLINE_EXTBINPREFIX "import -u WD\n" \ S6_EXTBINPREFIX "s6-sudod -t 2000 --\n" \ -S6RC_LIBEXECPREFIX "s6-rc-oneshot-run -l ${WD}/../.. --\n" +S6RC_EXTLIBEXECPREFIX "s6-rc-oneshot-run -l ${WD}/../.. --\n" static unsigned int verbosity = 1 ; static stralloc keep = STRALLOC_ZERO ; @@ -1037,7 +1037,7 @@ static inline void write_fdholder (char const *compiled, s6rc_db_t const *db, ui EXECLINE_EXTBINPREFIX "exit 1\n }\n " EXECLINE_EXTBINPREFIX "if -nt --\n {\n " S6_EXTBINPREFIX "s6-ipcclient -l0 -- s\n " - S6RC_LIBEXECPREFIX "s6-rc-fdholder-filler -1 -- ") + S6RC_EXTLIBEXECPREFIX "s6-rc-fdholder-filler -1 -- ") || !write_pipelines(&satmp, db) || !stralloc_cats(&satmp, "\n }\n " S6_EXTBINPREFIX "s6-svc -t .\n}\n")) dienomem() ; diff --git a/src/s6-rc/s6-rc.c b/src/s6-rc/s6-rc.c index 0229466..2b6e54c 100644 --- a/src/s6-rc/s6-rc.c +++ b/src/s6-rc/s6-rc.c @@ -87,7 +87,7 @@ static unsigned int compute_timeout (unsigned int i, int h) static pid_t start_oneshot (unsigned int i, int h) { unsigned int m = 0 ; - char const *newargv[11 + !!dryrun[0] * 6] ; + char const *newargv[11 + !!dryrun[0] * 8] ; char tfmt[UINT32_FMT] ; char vfmt[UINT_FMT] ; char ifmt[UINT_FMT] ; @@ -116,6 +116,11 @@ static pid_t start_oneshot (unsigned int i, int h) newargv[m++] = socketfn ; newargv[m++] = h ? "up" : "down" ; newargv[m++] = ifmt ; + if (dryrun[0]) + { + newargv[m++] = " #" ; + newargv[m++] = db->string + db->services[i].name ; + } newargv[m++] = 0 ; return child_spawn0(newargv[0], newargv, (char const *const *)environ) ; } |