diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-10-11 07:55:08 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2021-10-11 07:55:08 +0000 |
commit | ab40ddf5c704b9554fad990f73be95fa5fe58df3 (patch) | |
tree | 3bca52acfaf123377cb22b98187c67d006eccecb /src | |
parent | f7e593e27d93d04096cbc1b642c5e9745947a7af (diff) | |
download | s6-frontend-ab40ddf5c704b9554fad990f73be95fa5fe58df3.tar.gz s6-frontend-ab40ddf5c704b9554fad990f73be95fa5fe58df3.tar.xz s6-frontend-ab40ddf5c704b9554fad990f73be95fa5fe58df3.zip |
Add D, T, X and x support to sv
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/alias/s6-frontend-alias-sv.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/alias/s6-frontend-alias-sv.c b/src/alias/s6-frontend-alias-sv.c index 3b1d3ac..e38ab28 100644 --- a/src/alias/s6-frontend-alias-sv.c +++ b/src/alias/s6-frontend-alias-sv.c @@ -153,6 +153,12 @@ static int down (char const *dir, char const *const *envp) return action(dir, "-d", "-d", 'D', envp) ; } +static int forcedown (char const *dir, char const *const *envp) +{ + warnnokill() ; + return down(dir, envp) ; +} + static int bail (char const *dir, char const *const *envp) { int e ; @@ -162,6 +168,12 @@ static int bail (char const *dir, char const *const *envp) return e ; } +static int forcebail (char const *dir, char const *const *envp) +{ + warnnokill() ; + return bail(dir, envp) ; +} + static int hup_h (char const *dir, char const *const *envp) { return simple_svc(dir, "-h", envp) ; @@ -282,10 +294,19 @@ static int lsb_tryrestart (char const *dir, char const *const *envp) return e | status(dir, envp) ; } +static int lsb_forcetryrestart (char const *dir, char const *const *envp) +{ + warnnokill() ; + return lsb_tryrestart(dir, envp) ; +} + static info_t const commands[] = { { .name = "1", .f = &usr1_h }, { .name = "2", .f = &usr2_h }, + { .name = "D", .f = &forcedown }, + { .name = "T", .f = &lsb_forcetryrestart }, + { .name = "X", .f = &forcebail }, { .name = "a", .f = &alarm_h }, { .name = "al", .f = &alarm_h }, { .name = "ala", .f = &alarm_h }, @@ -354,7 +375,8 @@ static info_t const commands[] = { .name = "term", .f = &term_h }, { .name = "try-restart", .f = &lsb_tryrestart }, { .name = "u", .f = &up }, - { .name = "up", .f = &up } + { .name = "up", .f = &up }, + { .name = "x", .f = &bail } } ; int main (int argc, char const *const *argv, char const *const *envp) |