aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/s6-frontend/live.help.txt6
-rw-r--r--src/s6-frontend/repository_check.c2
-rw-r--r--src/s6-frontend/s6-frontend-internal.h1
-rw-r--r--src/s6-frontend/set.c1
-rw-r--r--src/s6-frontend/set.help.txt2
-rw-r--r--src/s6-frontend/set_change.c8
-rw-r--r--src/s6-frontend/set_check.c2
-rw-r--r--src/s6-frontend/set_list.c25
-rw-r--r--src/s6-frontend/set_status.c9
9 files changed, 36 insertions, 20 deletions
diff --git a/src/s6-frontend/live.help.txt b/src/s6-frontend/live.help.txt
index acb383b..88d51ca 100644
--- a/src/s6-frontend/live.help.txt
+++ b/src/s6-frontend/live.help.txt
@@ -10,14 +10,16 @@ Subcommands:
start-everything start all the services enabled at boot
stop-everything stop all the non-essential services
-s6 live status options: none
+s6 live status options:
+ -e --without-essentials ignore essential services (default)
+ -E --with-essentials also list essential services
s6 live start, s6 live stop, s6 live restart, s6 live stop-everything options:
-n --dry-run only show what would be done, don't do it
-t TIMEOUT --timeout=TIMEOUT if not done after TIMEOUT milliseconds, abort
s6 live install options:
- -b --block wait rather than fail on contention
+ -b --block on contention, wait rather than fail
-K --keep-old keep the old db and write its path to stdout
-f FILE --conversion-file=FILE use a conversion file from current to new set
diff --git a/src/s6-frontend/repository_check.c b/src/s6-frontend/repository_check.c
index a0e7737..a2c2cb8 100644
--- a/src/s6-frontend/repository_check.c
+++ b/src/s6-frontend/repository_check.c
@@ -26,7 +26,7 @@ void repository_check (char const *const *argv)
{ .so = 'e', .lo = "force-essential", .clear = 0, .set = GOLB_FORCE_ESSENTIAL },
{ .so = 'd', .lo = "down", .clear = GOLB_FIXUP, .set = 0 },
{ .so = 'u', .lo = "up", .clear = 0, .set = GOLB_FIXUP },
- { .so = 'f', .lo = "fix", .clear = 0, .set = GOLB_FIX },
+ { .so = 'F', .lo = "fix", .clear = 0, .set = GOLB_FIX },
} ;
uint64_t wgolb = 0 ;
unsigned int m = 0 ;
diff --git a/src/s6-frontend/s6-frontend-internal.h b/src/s6-frontend/s6-frontend-internal.h
index fdacb2b..253303d 100644
--- a/src/s6-frontend/s6-frontend-internal.h
+++ b/src/s6-frontend/s6-frontend-internal.h
@@ -81,6 +81,7 @@ extern void set_mask (char const *const *) gccattr_noreturn ;
extern void set_unmask (char const *const *) gccattr_noreturn ;
extern void set_enable (char const *const *) gccattr_noreturn ;
extern void set_disable (char const *const *) gccattr_noreturn ;
+extern void set_make_essential (char const *const *) gccattr_noreturn ;
extern void set_check (char const *const *) gccattr_noreturn ;
extern void set_commit (char const *const *) gccattr_noreturn ;
diff --git a/src/s6-frontend/set.c b/src/s6-frontend/set.c
index 8774aa5..b013c35 100644
--- a/src/s6-frontend/set.c
+++ b/src/s6-frontend/set.c
@@ -30,6 +30,7 @@ void set (char const *const *argv)
{ .s = "help", .f = &set_help },
{ .s = "list", .f = &set_list },
{ .s = "load", .f = &set_load },
+ { .s = "make-essential", .f = &set_make_essential },
{ .s = "mask", .f = &set_mask },
{ .s = "save", .f = &set_save },
{ .s = "status", .f = &set_status },
diff --git a/src/s6-frontend/set.help.txt b/src/s6-frontend/set.help.txt
index e998852..20deb73 100644
--- a/src/s6-frontend/set.help.txt
+++ b/src/s6-frontend/set.help.txt
@@ -33,7 +33,7 @@ s6 set enable|disable|mask|unmask options:
s6 set check options:
-E --no-force-essential do not allow manual changes to essential services (default)
-e --force-essential allow manual changes to essential services
- -f --fix try to fix inconsistencies automatically
+ -F --fix try to fix inconsistencies automatically
-d --down fix by disabling or masking services if necessary (default)
-u --up fix by enabling services if necessary
diff --git a/src/s6-frontend/set_change.c b/src/s6-frontend/set_change.c
index 5353422..b74d6ae 100644
--- a/src/s6-frontend/set_change.c
+++ b/src/s6-frontend/set_change.c
@@ -49,7 +49,7 @@ static void set_change (char const *const *argv, char const *newsub, char const
}
char fmtv[UINT_FMT] ;
- char const *newargv[13 + argc] ;
+ char const *newargv[14 + argc] ;
newargv[m++] = S6RC_EXTBINPREFIX "s6-rc-set-change" ;
if (g->verbosity != 1)
{
@@ -68,6 +68,7 @@ static void set_change (char const *const *argv, char const *newsub, char const
newargv[m++] = "-I" ;
newargv[m++] = wgola[GOLA_FORCELEVEL] ;
}
+ if (!strcmp(newsub, "always")) newargv[m++] = "-e" ;
newargv[m++] = "--" ;
newargv[m++] = "current" ;
newargv[m++] = newsub ;
@@ -96,3 +97,8 @@ void set_unmask (char const *const *argv)
{
set_change(argv, "usable", "unmask") ;
}
+
+void set_make_essential (char const *const *argv)
+{
+ set_change(argv, "always", "make-essential") ;
+}
diff --git a/src/s6-frontend/set_check.c b/src/s6-frontend/set_check.c
index 4abda87..b6f4924 100644
--- a/src/s6-frontend/set_check.c
+++ b/src/s6-frontend/set_check.c
@@ -26,7 +26,7 @@ void set_check (char const *const *argv)
{ .so = 'e', .lo = "force-essential", .clear = 0, .set = GOLB_FORCE_ESSENTIAL },
{ .so = 'd', .lo = "down", .clear = GOLB_FIXUP, .set = 0 },
{ .so = 'u', .lo = "up", .clear = 0, .set = GOLB_FIXUP },
- { .so = 'f', .lo = "fix", .clear = 0, .set = GOLB_FIX },
+ { .so = 'F', .lo = "fix", .clear = 0, .set = GOLB_FIX },
} ;
uint64_t wgolb = 0 ;
unsigned int m = 0 ;
diff --git a/src/s6-frontend/set_list.c b/src/s6-frontend/set_list.c
index 6c98137..f01ef47 100644
--- a/src/s6-frontend/set_list.c
+++ b/src/s6-frontend/set_list.c
@@ -9,23 +9,32 @@
#include "s6-frontend-internal.h"
+enum golb_e
+{
+ GOLB_IGNORE_ESSENTIALS = 0x01,
+} ;
+
void set_list (char const *const *argv)
{
+ static gol_bool const rgolb[] =
+ {
+ { .so = 'E', .lo = "with-essentials", .clear = GOLB_IGNORE_ESSENTIALS, .set = 0 },
+ { .so = 'e', .lo = "without-essentials", .clear = 0, .set = GOLB_IGNORE_ESSENTIALS },
+ } ;
+ uint64_t wgolb = 0 ;
unsigned int m = 0 ;
- char const *newargv[9] ;
+ char const *newargv[10] ;
char fmtv[UINT_FMT] ;
- argv += gol_argv(argv, 0, 0, 0, 0, 0, 0) ;
+ argv += gol_argv(argv, rgolb, 2, 0, 0, &wgolb, 0) ;
newargv[m++] = S6RC_EXTBINPREFIX "s6-rc-set-status" ;
- if (g->verbosity != 1)
- {
- fmtv[uint_fmt(fmtv, g->verbosity)] = 0 ;
- newargv[m++] = "-v" ;
- newargv[m++] = fmtv ;
- }
+ fmtv[uint_fmt(fmtv, g->verbosity)] = 0 ;
+ newargv[m++] = "-v" ;
+ newargv[m++] = fmtv ;
newargv[m++] = "-r" ;
newargv[m++] = g->dirs.repo ;
newargv[m++] = "-L" ;
+ newargv[m++] = wgolb & GOLB_IGNORE_ESSENTIALS ? "--without-essentials" : "--with-essentials" ;
newargv[m++] = "--" ;
newargv[m++] = "current" ;
newargv[m++] = 0 ;
diff --git a/src/s6-frontend/set_status.c b/src/s6-frontend/set_status.c
index 4cb04d3..baead01 100644
--- a/src/s6-frontend/set_status.c
+++ b/src/s6-frontend/set_status.c
@@ -47,12 +47,9 @@ void set_status (char const *const *argv)
}
#endif
newargv[m++] = S6RC_EXTBINPREFIX "s6-rc-set-status" ;
- if (g->verbosity != 1)
- {
- fmtv[uint_fmt(fmtv, g->verbosity)] = 0 ;
- newargv[m++] = "-v" ;
- newargv[m++] = fmtv ;
- }
+ fmtv[uint_fmt(fmtv, g->verbosity)] = 0 ;
+ newargv[m++] = "-v" ;
+ newargv[m++] = fmtv ;
newargv[m++] = "-r" ;
newargv[m++] = g->dirs.repo ;
newargv[m++] = wgolb & GOLB_IGNORE_ESSENTIALS ? "--without-essentials" : "--with-essentials" ;