[BusyBox] LSB compliant sysvinit applet.
David Seikel
won_fang at yahoo.com.au
Thu Mar 10 23:10:33 UTC 2005
On Mon, 7 Mar 2005 09:16:11 -0500 Rob Landley <rob at landley.net> wrote:
> Applets in other directories? (Are you talking the standalone shell
> code?)
What I'm talking about is the possible directories that busybox applets
can be "in", where the links end up after a busybox --install.
Currently they are limited to /, /bin, /sbin, /usr/bin, and /usr/sbin.
I have written the following applets that don't fit into this scheme -
/etc/init.d/rcS - from the default inittab
/usr/share/udhcpc/default.script - ifup calls udhcpc with the default
script.
/lib/lsb/init-functions
/usr/lib/lsb/install_initd
/usr/lib/lsb/remove_initd - LSB insists on these locations.
/etc/init.d/* - init "scripts" implemeted as busybox applets, again LSB
insists.
I currently use links and wrapper shell scripts to get these in the
right place, while keeping the applets themselves in /sbin and
/usr/sbin. It would be a lot cleaner if busybox supported them
directly. Probably too much for me to ask for though.
> As for hard wiring in a different inittab... Have to think about the
> issues when I have more time...
<snip>
> The runlevel switching code is roughly the same logic as the full
> inittab re-reading code. The tricky bit we don't currently do is
> shutting down the old processes we spawned. (And what you really want
> is to preserve the processes that are still there at the same
> runlevel. Don't kill and respawn _everything_ just what needs it.)
> The logic to do that's not too hard, once you've thought through the
> problem. Might want to make it a config option, though...
My applets take care of all the runlevel switching already. Hopefully I
can dump the code someplace public today and you can all see what I am
talking about.
More information about the busybox
mailing list