Linux: only filter "auto" from command line if running as pid 1.
authorDavin McCall <davmac@davmac.org>
Sat, 27 Oct 2018 15:09:50 +0000 (16:09 +0100)
committerDavin McCall <davmac@davmac.org>
Mon, 29 Oct 2018 22:17:31 +0000 (22:17 +0000)
src/dinit.cc

index 535dcaa12539f014cfc7ce3268d4a8fdfb7571f6..35740c40c0e654d89413cb814760aef05a774cad 100644 (file)
@@ -261,7 +261,7 @@ int dinit_main(int argc, char **argv)
             else {
 #ifdef __linux__
                 // LILO puts "auto" on the kernel command line for unattended boots; we'll filter it.
-                if (! am_system_init || strcmp(argv[i], "auto") != 0) {
+                if (! am_pid_one || strcmp(argv[i], "auto") != 0) {
                     services_to_start.push_back(argv[i]);
                 }
 #else