$ ps 66-shutdownd
pid
326 ? Ss 0:00 66-shutdownd -l /run/66/ -s /etc/66/ -g 3000

I have been making a claim on 66 promotion which is not entirely true, that 66 doesn't take resources unless it is modifying how services are starting/running/stopping. 66-shutdownd is one that does run all the time. Ok, it is just a replacement/modification of s6-shutdownd.

1 Why does it need to run?
2 What happens if it doesn't run, can you shutdown/reboot?
3 If you can shutdown/reboot with it stopped, why is it ultimately needed?
Ok, it is just a replacement/modification of s6-shutdownd
yes , this API do not come from me and so 66 doesn't take ressources. It was renamed to 66-shutdownd to avoid confusion with the original one and to be consistent with the other 66 tools name.
@ 1
It handle correctly the shutdown process which create on the fly the stage4 and handle the 66-umountall program(s6-umountall). As it a independent program which do not depends on any tree it can be survive until the last second of the shutdown procedure.
@ 2
You will loose features like the ability to program a shutdown at specific time. Also, you can reboot or shutdown using the 66-hpr program but you need to use the -f option
@ 3
well if you use 66-hpr -f an immediate shutdown/reboot is executed but it only make a sync. it do not stop service, umount disk, ....
Ok you almost covered my next question, where is this initiated if not on 66 boot, is it a modification of the s6-rc itself or is it part of the 66 that picks up after init. From the pid # it seems to start before tty12, so before boot tree. Sorry for asking such trivial stuff, it might be clearly defined somewhere in init but I don't understand it.
66-boot calls 66-scandir to create the live directory and 66-scandir make it on the fly. You may treat it as an earlier service. So every scandir created will contain automatically the 66-shutdownd service
I think a novice would say, well why do all this when you can write a script that will do all those things to shutdown the system and just call it when you are ready to shutdown, but what happens when things have fallen apart, who shuts the system down so things don't get corrupt? Nobody, can. And then, when you gradually shut things down there is not much of a system left to those things, so it has to be from the start ready to shutdown when things are no longer going well.

I think I get it now, or at least enough to make sense of the whole thing. Maybe I graduated from kindergarten to 1st grade.
66-shutdownd is a daemon, you can create it as any service. It made by 66-scandir to avoid to take care about it because in all case it needs to be present on every scandir. So the most simple for an easy use is to create it automatically at a scandir creation. This simplify a little bit the use, nothing more.
If i don't create it a novice user would say:"why do you not create it directly because it needs to be present?" :)

Powered by Obarun