diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-06-25 21:07:20 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-06-25 21:07:20 +0000 |
commit | 21cb73b507d27bcb101a1f3ae95312d22952988b (patch) | |
tree | d6e4250383a6e17011e9de10bcdb5ff655925fed | |
parent | 787c41b9bed5de99459916e0bd1ce7db8b3b8240 (diff) | |
download | s6-linux-init-21cb73b507d27bcb101a1f3ae95312d22952988b.tar.xz |
replace if with foreground in finish script
-rw-r--r-- | src/init/s6-linux-init-maker.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/init/s6-linux-init-maker.c b/src/init/s6-linux-init-maker.c index fe10e3c..7032bc7 100644 --- a/src/init/s6-linux-init-maker.c +++ b/src/init/s6-linux-init-maker.c @@ -102,11 +102,11 @@ static int finish_script (buffer *b) if (buffer_puts(b, "#!") < 0 || buffer_puts(b, bindir) < 0 || buffer_puts(b, "/execlineb -S0\n\n" - "cd /\nredirfd -w 2 /dev/console\nfdmove -c 1 2\nif { s6-svc -X -- ") < 0 + "cd /\nredirfd -w 2 /dev/console\nfdmove -c 1 2\nforeground { s6-svc -X -- ") < 0 || !string_quote(&satmp, slashrun, str_len(slashrun))) return 0 ; if (buffer_put(b, satmp.s + sabase, satmp.len - sabase) < 0) goto err ; satmp.len = sabase ; - if (buffer_puts(b, "/service/s6-svscan-log }\nwait -r -- { }\n") < 0 + if (buffer_puts(b, "/service/s6-svscan-log }\nunexport ?\nwait -r -- { }\n") < 0 || !string_quote(&satmp, shutdown_script, str_len(shutdown_script))) return 0 ; if (buffer_put(b, satmp.s + sabase, satmp.len - sabase) < 0) goto err ; satmp.len = sabase ; |