[PATCH] - allow specification of alternate inittab files

B Thomas bjthomas3 at gmail.com
Tue Oct 31 15:51:27 PST 2006


Hey, you're probably correct.  It was a long, twisty path before I got to
the final patch including many detours and changes of direction.  Let me
rework it with the environment variables and resubmit.

Thanks,
-b


On 10/31/06, Denis Vlasenko <vda.linux at googlemail.com> wrote:
>
> 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 >                         if (i = MAX_INIT_ENVS) {
>                                 panic_later > `%s'";
>                                 panic_param >                         }
>                         if (!strncmp(param, envp_init[i], val - param))
>                                 break;
>                 }
> ....
>
> So you do not need to parse /proc/commandline
> --
> vda
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/busybox/attachments/20061031/54888e9f/attachment.htm 


More information about the busybox mailing list