[Toybox] init.c ?

Rob Landley rob at landley.net
Tue Apr 20 00:19:39 PDT 2021


On 4/18/21 9:03 PM, scsijon wrote:
> Just wondering what the status is for the init currently in pending please?
> I've got a linux microbuild underway that currently works with busybox and uses
> busybox's init to run and I would like to at least create a test build with
> toybox as it looks like everything else it needs from busybox is also already up
> and live in toybox.

Mostly I just haven't prioritized it? (You're the first to ask in a while, I
mostly just use oneit for my stuff, and android has its own giant init thing. I
plan to do it before 1.0, but it hasn't been a blocker.)

It's not hugely complicated, but I need to wrap my head around what's there...
why does the signal handler disable ctrl-alt-del if called with an unknown
signal (and then hang)? Why initialize it to 0 and have a default: case if you
don't intend that codepath to be used?

The halt/reboot/shutdown commands are tangled into this because they generally
work by signaling init to restart the system (so it can cleanly shut down
daemons and such, the -f option will do it directly). And there's runlevel
support which busybox never implemented but I want to do...

Rob

P.S. This is not counting the whole "figure out what 20% of systemd support
would be worth doing so the maximum number of people can AVOID using the rest of
it". I sat down with its author in 2015 and my notes are at
https://landley.net/systemd-notes.txt but I'm fuzzy on what any of that meant
after all this time, and it's a moving target and I'm behind again... But
sysvinit is good to have on its own. The problem was that sysvinit is a serial
boot, and some IBM guys tried to parallelize init to speed up booting using
"make -j" (https://lwn.net/Articles/50115/) back in 2003, which was horrible
(because make is horrible) but that led to ubuntu deciding to replace bash with
dash in 2005 to try to speed up the boot (which remains the dumbest technical
decision ubuntu has EVER MADE despite fierce competition,
https://wiki.ubuntu.com/DashAsBinSh ), and then circa 2006 SMP started to become
ubiquitous so they did upstart to parallelize the boot, and Red Hat had Not
Invented Here syndrome and did systemd instead and then decided that every demon
in the entire system should run in a single monolithic address space because
security and maintainability were too high otherwise and why would you pay
$5k/seat to Red Hat if your system could be understood and maintained by mere
humans... Ahem. Yeah, I should clean up sysvinit, but I'm trying to add function
support to toysh and cut another overdue release.



More information about the Toybox mailing list