If we're not PID 1, dinit may be being executed by mistake (instead of dinitctl). We need any error messages to be displayed before exiting, in this case, to the current error stream.
@@ -367,8 +367,8 @@ int dinit_main(int argc, char **argv)
return 1;
}
-
- if (am_system_init) {
+
+ if (am_system_mgr) {
// setup STDIN, STDOUT, STDERR so that we can use them
int onefd = open("/dev/console", O_RDONLY, 0);
if (onefd != -1) {