[BusyBox] still fighting with minit
Glenn McGrath
bug1 at iinet.net.au
Thu Mar 25 12:47:09 UTC 2004
On Thu, 25 Mar 2004 06:04:26 -0500 (EST)
"Robert P. J. Day" <rpjday at mindspring.com> wrote:
> a glance, i'm assuming that this is what i should have noticed.
> in the current (2.4.22) version of our kernel, in init/main.c, i see
> the code:
>
> static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
> ...
> if (execute_command)
> execve(execute_command,argv_init,envp_init);
> execve("/sbin/init",argv_init,envp_init);
> execve("/etc/init",argv_init,envp_init);
> execve("/bin/init",argv_init,envp_init);
> execve("/bin/sh",argv_init,envp_init);
> panic("No init found. Try passing init= option to kernel.");
>
> and in the 2.6 code in that same file, i find:
>
> static void run_init_process(char *init_filename)
> {
> argv_init[0] = init_filename;
> execve(init_filename, argv_init, envp_init);
> }
> ...
>
> if (execute_command)
> run_init_process(execute_command);
>
> run_init_process("/sbin/init");
> run_init_process("/etc/init");
> run_init_process("/bin/init");
> run_init_process("/bin/sh");
>
> panic("No init found. Try passing init= option to kernel.");
>
> which, to my untrained eye, seems to solve that particular problem.
> is this what you were referring to? again, thanks for your time.
Yes, thats it, run_init_process sets argv[0] properly.
Glenn
More information about the busybox
mailing list