return -EINVAL;
}
+ /* PID 1 will get the kernel arguments as parameters, which we
+ * ignore and unconditionally read from
+ * /proc/cmdline. However, we need to ignore those arguments
+ * here. */
+ if (running_as != MANAGER_INIT && optind < argc) {
+ log_error("Excess arguments.");
+ return -EINVAL;
+ }
+
return 0;
}
/* Reset the console, but only if this is really init and we
* are freshly booted */
- if (running_as == MANAGER_INIT)
+ if (running_as == MANAGER_INIT && action == ACTION_RUN)
console_setup(getpid() == 1 && !serialization);
/* Make sure D-Bus doesn't fiddle with the SIGPIPE handlers */
}
if (action == ACTION_TEST) {
- printf("→ By units:\n");
+ printf("-> By units:\n");
manager_dump_units(m, stdout, "\t");
}
}
if (action == ACTION_TEST) {
- printf("→ By jobs:\n");
+ printf("-> By jobs:\n");
manager_dump_jobs(m, stdout, "\t");
retval = 0;
goto finish;