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;
/* There are things we cannot get rid of. Loop one more time
* with LOG_ERR to inform the user. Note that we don't need
* to do this if there is a initrd to switch to, because that
- * one is likely to get rid of the remounting mounts. If not,
+ * one is likely to get rid of the remaining mounts. If not,
* it will log about them. */
umount_log_level = LOG_ERR;
continue;
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. */
}