diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c index d2b162994c..29b24906a6 100644 --- a/src/shutdown/shutdown.c +++ b/src/shutdown/shutdown.c @@ -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; @@ -556,8 +559,10 @@ int main(int argc, char *argv[]) { sync_with_progress(); if (streq(arg_verb, "exit")) { - if (in_container) + if (in_container) { + log_info("Exiting container."); return arg_exit_code; + } cmd = RB_POWER_OFF; /* We cannot exit() on the host, fallback on another method. */ }