tree 5034edc010e2ad898f1fe81a0937352aae95de93
parent 8fc2751beb0941966d3a97b26544e8585e428c08
author Avery, Brian <[EMAIL PROTECTED]> Wed, 07 Sep 2005 05:16:56 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Thu, 08 Sep 2005 06:57:23 -0700

[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: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 init/main.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/init/main.c b/init/main.c
--- a/init/main.c
+++ b/init/main.c
@@ -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");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to