summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAvery, Brian <b.avery@hp.com>2005-09-07 00:16:56 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-08 01:57:23 +0200
commitc1d7ef70a71eb54fb389a9a411d331661be73056 (patch)
tree5034edc010e2ad898f1fe81a0937352aae95de93 /init
parent[PATCH] disk quotas fail when /etc/mtab is symlinked to /proc/mounts (diff)
downloadlinux-c1d7ef70a71eb54fb389a9a411d331661be73056.tar.xz
linux-c1d7ef70a71eb54fb389a9a411d331661be73056.zip
[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 <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/init/main.c b/init/main.c
index a29fb2ac7240..e4dbcbcd26cf 100644
--- 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");