[PATCH] - allow specification of alternate inittab files
Denis Vlasenko
vda.linux at googlemail.com
Wed Nov 1 00:11:33 UTC 2006
On Tuesday 31 October 2006 23:22, B Thomas wrote:
> Hi,
>
> There are circumstances in which it would be great to allow the selection of
> different inittab file at boot time. This patch adds the ability to select
> the inittab file via a command line option (bb_inittab).
>
> One of the things that I don't like about this patch is the need to mount
> /proc on systems in which it isn't mounted. The mount is cleaned up and
> handled carefully; I just don't like having to do it. Having said that,
> this patch has proven to be quite useful.
>
> Signed-off-by: Ben Thomas (ben at virtualiron.com)
I thought that all unrecognized kernel params are passed in the environment
to init: kernel tree, init/main.c:
/*
* Unknown boot options get handed to init, unless they look like
* failed parameters
*/
static int __init unknown_bootoption(char *param, char *val)
{
....
if (val) {
/* Environment option */
unsigned int i;
for (i = 0; envp_init[i]; i++) {
if (i == MAX_INIT_ENVS) {
panic_later = "Too many boot env vars at `%s'";
panic_param = param;
}
if (!strncmp(param, envp_init[i], val - param))
break;
}
....
So you do not need to parse /proc/commandline
--
vda
More information about the busybox
mailing list