shutdown: set always_reopen_console
Back in v232 systemd-shutdown would log to /dev/console. However after the addition of always_reopen_console (v233) it would log to STDERR. This caused some debugging issues as container systemd-shutdown logs weren't being logged to console as the arg `--log-target=console` suggested. Since it appears that always_reopen_console was intended for pid1, set it in systemd-shutdown as well so logs will go to /dev/console.
This commit is contained in:
@@ -322,6 +322,9 @@ int main(int argc, char *argv[]) {
|
||||
log_set_prohibit_ipc(true);
|
||||
log_parse_environment();
|
||||
|
||||
if (getpid_cached() == 1)
|
||||
log_set_always_reopen_console(true);
|
||||
|
||||
r = parse_argv(argc, argv);
|
||||
if (r < 0)
|
||||
goto error;
|
||||
|
||||
Reference in New Issue
Block a user