Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1d7ef70 authored by Brian Avery's avatar Brian Avery Committed by Linus Torvalds
Browse files

[PATCH] Add warning `init=' to init/main.c



I passed init=/mylinuxrc to the kernel on the command line.  The kernel
silently dropped down to exec /sbin/init.  It turned out that /mylinuxrc
had improper permissions.  Without any warning message from the kernel that
something was wrong it took awhile to find the issue.  The patch below adds
a warning.

Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8fc2751b
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -708,10 +708,11 @@ static int init(void * unused)
	 * The Bourne shell can be used instead of init if we are 
	 * trying to recover a really broken machine.
	 */

	if (execute_command)
	if (execute_command) {
		run_init_process(execute_command);

		printk(KERN_WARNING "Failed to execute %s.  Attempting "
					"defaults...\n", execute_command);
	}
	run_init_process("/sbin/init");
	run_init_process("/etc/init");
	run_init_process("/bin/init");