Closed illiliti closed 4 years ago
We were previously handling shutdown in a hook on the sinit package, but I personally think this usage on the init is better. It does nothing if no arguments are given.
I will be adding hooks for sysmgr, though. Since runit is also in busybox, it is a little more complicated to handle (per package), but it can be installed seperately as a hook on baseinit?
kpow
portions are intended for portability reasons (they can be skipped as well)./dev/
. The init will kill
the device manager to make way for a service manager as well.sv
command will simply do nothing if not using runit based tools for services.This being said, I'm thinking of deprecating /etc/inittab
. This will simply take some time from the
announcement to the replacement, etc. I see nothing to do right in this moment though.
Well...What if i want to add support for mdevd, smdev, vdev, ... ? This will lead to code bloat
We'd then move the code to a function in rc.lib
which is called from rc.boot
. In an ideal world we'd be able to avoid device managers in the init altogether (and only start them with the service manager). We do not live in an ideal world though.
Regarding "bloat" (which is too broad a word to ever be used in a serious context). This is the cost of choice. This cost additionally becomes greater when there is no standard between the choices themselves.
Device managers are relatively simple to add to the boot process. Additions are merely a new branch in a set of if statements. This isn't too bad at all and it actually scales well. There's also no real interest in other device managers. No one has submitted issues or patches to add support for them.
In an ideal world we'd be able to avoid device managers in the init altogether (and only start them with the service manager). We do not live in an ideal world though.
I'm currently doing that using initramfs
Additions are merely a new branch in a set of if statements. This isn't too bad at all and it actually scales well.
OK
I think those parts of code should be handled in hooks to be more init agnostic
@cemkeylan pinging you because you maintainer of sysmgr, sinit, runit
rc.boot https://github.com/kisslinux/init/blob/0198696e5ea9e3fa00f62781c068046944e2e0e0/lib/init/rc.boot#L35-L50 https://github.com/kisslinux/init/blob/0198696e5ea9e3fa00f62781c068046944e2e0e0/lib/init/rc.boot#L107-L121
rc.shutdown https://github.com/kisslinux/init/blob/0198696e5ea9e3fa00f62781c068046944e2e0e0/lib/init/rc.shutdown#L15-L17 https://github.com/kisslinux/init/blob/0198696e5ea9e3fa00f62781c068046944e2e0e0/lib/init/rc.shutdown#L57-L64