troglobit / finit

Fast init for Linux. Cookies included
https://troglobit.com/projects/finit/
MIT License
621 stars 61 forks source link

Add fail-secure runlevel redirect on user condition #369

Closed troglobit closed 9 months ago

troglobit commented 9 months ago

User story:

User detects a problem at boot, unrelated to Finit, e.g. bootstrapping a critical system service or HW problem. Continuing would render the system unusable to an end-user.

Normally the default runlevel (2) is started after bootstrap, but in this case the user wants to instead go to runlevel 9 where only a few select services run. A "Fail Secure" mode.

Investigate:

Is it better to update /etc/finit.conf for this, changing runlevel 2 -> 9, or is it better to let the user call initctl runlevel 9?

In the latter case it would be interpreted by Finit (PID 1) as; "aha, we're still in runlevel S, but when we're done here (timeout of remaining S-only run/task/services or not) we should now go to runlevel 9 instead of 2. OK captain!"