Let's make sure libselinux doesn't spew to stderr
}
arg_running_as = MANAGER_SYSTEM;
+
+ make_null_stdio();
log_set_target(detect_container(NULL) > 0 ? LOG_TARGET_JOURNAL : LOG_TARGET_JOURNAL_OR_KMSG);
if (!skip_setup) {
/* Reset the console, but only if this is really init and we
* are freshly booted */
- if (arg_running_as == MANAGER_SYSTEM && arg_action == ACTION_RUN) {
+ if (arg_running_as == MANAGER_SYSTEM && arg_action == ACTION_RUN)
console_setup(getpid() == 1 && !skip_setup);
- make_null_stdio();
- }
/* Open the logging devices, if possible and necessary */
log_open();
/* Now load the policy */
before_load = now(CLOCK_MONOTONIC);
r = selinux_init_load_policy(&enforce);
-
if (r == 0) {
char timespan[FORMAT_TIMESPAN_MAX];
char *label;