diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-01-19 07:52:07 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-01-19 07:52:07 +0000 |
| commit | 2d9ad3bdb3a693e8cb0fa3c037c2dba3fc7bfb52 (patch) | |
| tree | a898e1f85ed277e499551ecc2c5450088b33363b | |
| parent | a4771a151ba75934b2864e886139d6a25ee81c5f (diff) | |
| download | s6-frontend-2d9ad3bdb3a693e8cb0fa3c037c2dba3fc7bfb52.tar.gz | |
Some fixes
| -rw-r--r-- | doc/overview.html | 5 | ||||
| -rw-r--r-- | src/s6-frontend/live_status.c | 22 | ||||
| -rw-r--r-- | src/s6-frontend/process_kill.c | 2 | ||||
| -rw-r--r-- | src/s6-frontend/process_restart.c | 2 | ||||
| -rw-r--r-- | src/s6-frontend/process_status.c | 2 | ||||
| -rw-r--r-- | src/s6-frontend/s6-frontend.c | 4 |
6 files changed, 24 insertions, 13 deletions
diff --git a/doc/overview.html b/doc/overview.html index 63bd3bd..01ca88a 100644 --- a/doc/overview.html +++ b/doc/overview.html @@ -103,7 +103,8 @@ which means that the package manager should install service definition directories in <tt>/usr/share/s6-frontend/s6-rc/sources</tt>, and that administrators should do their local modifications in <tt>/etc/s6-frontend/s6-rc/sources</tt>. You can modify this store list -in the configuration file, see below. </li> +at build time with the <tt>--storelist</tt> configure option, or after +installation in the s6-frontend configuration file, see below. </li> </ul> </li> <li> And then you need the service definitions themselves. <ul> @@ -122,7 +123,7 @@ itself. </li> <li> OpenRC also comes with a set of basic services: it provides some policy itself as well. </li> <li> s6-frontend <em>does not</em> provides policy, but since basic service -files is essential for people to use it, work is underway to write these. They +files are essential for people to use it, work is underway to write them; they will be provided in a separate package. In the meantime, you can find service definitions contributed by the community pretty much everywhere s6-rc is used. The s6-rc package comes with some diff --git a/src/s6-frontend/live_status.c b/src/s6-frontend/live_status.c index e657bc2..2a3a9af 100644 --- a/src/s6-frontend/live_status.c +++ b/src/s6-frontend/live_status.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include <string.h> #include <unistd.h> #include <sys/wait.h> @@ -27,24 +28,33 @@ static void live_status_all (int withe) gccattr_noreturn ; static void live_status_all (int withe) { - char const *argv[17] ; unsigned int m = 0 ; + size_t llen = strlen(g->dirs.live) ; + char const *argv[21] ; + char llivedir[llen + 3] ; + llivedir[0] = ' ' ; llivedir[1] = ' ' ; + memcpy(llivedir + 2, g->dirs.live, llen + 1) ; + argv[m++] = EXECLINE_EXTBINPREFIX "if" ; argv[m++] = " " EXECLINE_EXTBINPREFIX "pipeline" ; argv[m++] = " " S6RC_EXTBINPREFIX "s6-rc" ; + argv[m++] = " -l" ; + argv[m++] = llivedir ; argv[m++] = withe ? " -buaE" : " -buae" ; argv[m++] = " list" ; argv[m++] = " " ; argv[m++] = " sed" ; - argv[m++] = " s|$|/up" ; + argv[m++] = " s|$|/up|" ; argv[m++] = "" ; argv[m++] = EXECLINE_EXTBINPREFIX "pipeline" ; argv[m++] = " " S6RC_EXTBINPREFIX "s6-rc" ; + argv[m++] = " -l" ; + argv[m++] = llivedir + 1 ; argv[m++] = withe ? " -bdaE" : " -bdae" ; argv[m++] = " list" ; argv[m++] = "" ; argv[m++] = "sed" ; - argv[m++] = "s|$|/down" ; + argv[m++] = "s|$|/down|" ; argv[m++] = 0 ; main_pretty_exec(argv) ; } @@ -163,7 +173,7 @@ static void live_status_some (char const *const *services, int withe) argv[m++] = " /dev/fd/3" ; argv[m++] = " " ; argv[m++] = " sed" ; - argv[m++] = " s|$|/up" ; + argv[m++] = " s|$|/up|" ; argv[m++] = "" ; argv[m++] = EXECLINE_EXTBINPREFIX "piperw" ; argv[m++] = "3" ; @@ -189,7 +199,7 @@ static void live_status_some (char const *const *services, int withe) argv[m++] = " /dev/fd/3" ; argv[m++] = "" ; argv[m++] = "sed" ; - argv[m++] = "s|$|/down" ; + argv[m++] = "s|$|/down|" ; argv[m++] = 0 ; main_pretty_exec(argv) ; } @@ -209,6 +219,6 @@ void live_status (char const *const *argv) uint64_t wgolb = 0 ; argv += gol_argv(argv, rgolb, 2, 0, 0, &wgolb, 0) ; - if (!argv) live_status_all(wgolb & GOLB_INCLUDE_ESSENTIALS) ; + if (!*argv) live_status_all(wgolb & GOLB_INCLUDE_ESSENTIALS) ; else live_status_some(argv, wgolb & GOLB_INCLUDE_ESSENTIALS) ; } diff --git a/src/s6-frontend/process_kill.c b/src/s6-frontend/process_kill.c index a17a141..64a97af 100644 --- a/src/s6-frontend/process_kill.c +++ b/src/s6-frontend/process_kill.c @@ -102,7 +102,7 @@ void process_kill (char const *const *argv) char svcopt[5] = "-!\0\0\0" ; argv += GOL_argv(argv, rgolb, rgola, &wgolb, wgola) ; - if (!argv) dieusage() ; + if (!*argv) dieusage() ; if (wgola[GOLA_SIGNAL]) { if (!sig0_scan(wgola[GOLA_SIGNAL], &sig)) diff --git a/src/s6-frontend/process_restart.c b/src/s6-frontend/process_restart.c index a1f6a9b..5ca11c7 100644 --- a/src/s6-frontend/process_restart.c +++ b/src/s6-frontend/process_restart.c @@ -39,7 +39,7 @@ void process_restart (char const *const *argv) unsigned int timeout = 0 ; unsigned int argc ; argv += GOL_argv(argv, rgolb, rgola, &wgolb, wgola) ; - if (!argv) dieusage() ; + if (!*argv) dieusage() ; if (wgola[GOLA_TIMEOUT]) { if (!uint0_scan(wgola[GOLA_TIMEOUT], &timeout)) diff --git a/src/s6-frontend/process_status.c b/src/s6-frontend/process_status.c index f9d05cf..d639cdc 100644 --- a/src/s6-frontend/process_status.c +++ b/src/s6-frontend/process_status.c @@ -90,7 +90,7 @@ void process_status (char const *const *argv) int e = 0 ; argv += gol_argv(argv, rgolb, 2, 0, 0, &wgolb, 0) ; - if (!argv) dieusage() ; + if (!*argv) dieusage() ; process_check_services(argv, env_len(argv)) ; for (; *argv ; argv++) { diff --git a/src/s6-frontend/s6-frontend.c b/src/s6-frontend/s6-frontend.c index 6933b57..8fe6428 100644 --- a/src/s6-frontend/s6-frontend.c +++ b/src/s6-frontend/s6-frontend.c @@ -67,8 +67,8 @@ void main_pretty_exec (char const *const *argv) newargv[m++] = EXECLINE_EXTBINPREFIX "pipeline" ; newargv[m++] = "--" ; m += s6f_equote(newargv + m, argv, argc, 0, espace) ; - newargv[m++] = " column" ; - newargv[m++] = " -ts/" ; + newargv[m++] = "column" ; + newargv[m++] = "-ts/" ; newargv[m++] = 0 ; main_exec(newargv) ; } |
