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

Tom Oehser tom at toms.net
Sat Apr 27 07:07:03 UTC 2002


> 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

But sysvinit uses -HUP and -q, also.  I think we would want both,
maybe the signal and option would just send the command to the pipe.

> I do not want to see the ID field getting trickier.  We have a
> perfectly unused runlevels field that is totally ignored at the

I personally want it to be more like sysv, not less, if I use the
runlevels wrong it would get worse.  But I might drop the ; idea.

> 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...

I thought about doing it that way or with a hash of the line, but
my thought was that eventually it would be good to have it be able
to associate id X even if the command changes.  Also, I could see
several reasons to run the same command twice, especially if there
is no tty specified.  Suppose it is something that knows to get the
next outgoing tcp port for whatever it does, and you want to run 10.

Also, I need to point out that I'm primarily focused on getting it
to do what tomsrtbt needs, which is just to add the reload with new
task functionality- implementing /dev/initctl is out of my scope.
And, that onced I know init.c this well, I'll probably hack it *way*
down, and have a tomsrtbt-specific version.  I just want to get the
parts (if any) of what I'm doing that are useful or interesting to
anyone else posted in a usable form *before* I turn it into something
unrecognizable or rewrite a nasm init...

The feedback I still want is if anyone is using the existing 'restart'
hack- can that just be chopped out?

My current plan is to drop the ";" trickyness idea, but still use the
ID field for uniqueness/reload testing, the visible effect being that
if you give an id which is NOT a valid tty, it won't give an error,
rather it will for tty purposes act as though there was nothing specified,
but will use it for the ID.

Note, I don't personally feel that runlevels or /dev/initctl is worth it,
overall I'm trying to make things smaller, not better, and the only
reason I'm trying to improve the HUP stuff is that I have a specific
need where the basic way my startup worked is broken.

I probably will post a patch towards the end of this weekend FWIW, then
I'll move on to butchering it beyond recognition or writing it in nasm.

-Tom





More information about the busybox mailing list