[BusyBox] My plans for an init.c patch to make ids & reloading different.

Paul Jimenez pj at place.org
Sat Apr 27 00:16:03 UTC 2002


On Friday, Apr 26, 2002, Erik Andersen writes:
>On Sat Apr 27, 2002 at 12:06:48AM -0400, Tom Oehser wrote:
>> 
>> Well, I'm hacking away at init.c.
>> 
>> Until very recently, I pretty much *had* to use sysvinit for other
>> reasons, that is, busybox was on /usr, and I didn't want another one
>> just for init.  But now, with tomsrtbt-2.x.x, it is all together on one
>> root, so I thought, "great, now I can replace sysvinit with busybox".
>[---------snip---------]
>> Basically, I want to be able to add actions after init is running,
>> *without* side effects on running actions.
>
>What I would prefer to see us getting rid of all the silly signal
>stuff and use /dev/inittctl to talk to the init process per what
>sysvinit does.  That would make it easy for us to implement
>things like proper 'init -q' support, as well as making it easier
>to support all sorts of evil hacks (like pausing init while
>flashing things, or using pivot_root followed by a re-exec of
>init).
>
>I do not want to see the ID field getting trickier.  We have a
>perfectly unused runlevels field that is totally ignored at the
>moment.  I suspect that even without an ID field, we can probably
>discriminate after an 'init -q' to see if we are already running
>a certain task on a certain tty, it seems that we can probably
>just discriminate based on the command string and tty...
>
> -Erik

What if we use the ID field as it is intended make inittab
check the command string for a leading 'getty ' or 'on_tty ' or
something to emulate current redirection stuff and remove the
current overloaded behaviour?  The rest falls out then, I think.
So
tty1::askfirst:/bin/sh 
might become
1::askfirst:on_tty tty1 /bin/sh

and inittab groks the 'on_tty tty1' and runs /bin/sh on it.  Note that
this also makes it possible to write the small 'on_tty' program on a
full system and have your inittab work both places.  Or maybe we should
just add a 'getty' module to busybox and use that. 

I guess I just think that overloading the ID field is/was a bad idea.

Alternately, we can junk the entire inittab thing
and go with something like the Linux bootscripts
(http://www.atnf.csiro.au/people/rgooch/linux/boot-scripts/)
algorithm/process for booting up.  Requires named FIFOs work, but can
implement any of the standard bootmethods.

  --pj




More information about the busybox mailing list