We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 87f9300 + 016f36a commit bcceabcCopy full SHA for bcceabc
src/shutdown/shutdown.c
@@ -322,6 +322,9 @@ int main(int argc, char *argv[]) {
322
log_set_prohibit_ipc(true);
323
log_parse_environment();
324
325
+ if (getpid_cached() == 1)
326
+ log_set_always_reopen_console(true);
327
+
328
r = parse_argv(argc, argv);
329
if (r < 0)
330
goto error;
@@ -556,8 +559,10 @@ int main(int argc, char *argv[]) {
556
559
sync_with_progress();
557
560
558
561
if (streq(arg_verb, "exit")) {
- if (in_container)
562
+ if (in_container) {
563
+ log_info("Exiting container.");
564
return arg_exit_code;
565
+ }
566
567
cmd = RB_POWER_OFF; /* We cannot exit() on the host, fallback on another method. */
568
}
0 commit comments