troglobit / finit

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

reboot and initctl does not work in sulogin #247

Closed troglobit closed 2 years ago

troglobit commented 2 years ago

Discussed in https://github.com/troglobit/finit/discussions/243

Originally posted by **hongkongkiwi** April 22, 2022 So I jumped into rescue mode to test it out (I have sulogin on my system) it seems the internal finit communication doesn't work properly (is this intentional?) I noticed it as I like to type (reboot): ``` # reboot reboot: Failed connecting to finit: No such file or directory # ls -lh /sbin/reboot lrwxrwxrwx 1 root root 7 Apr 7 2021 /sbin/reboot -> initctl # which reboot /sbin/reboot ``` Same thing happens with initctl ``` # initctl status initctl: Failed connecting to finit: No such file or directory # which initctl /sbin/initctl # ls -lh /sbin/initctl -rwxr-xr-x 1 root root 49.6K Apr 7 2021 /sbin/initctl ``` Also finit itself: ``` # finit 6 initctl: Failed connecting to finit: No such file or directory ``` Using the `exit` command works fine to continue to boot the system as normal (presumably because it's a builtin shell command)
troglobit commented 2 years ago

Fixed, sort of. When using the bundled sulogin reboot(initctl) can detect it's in sulogin mode and trigger over to default to -f (force). Nothing can be done about initctl's other commands since Finit is paused in the background when running the system in this diminished mode. This has been documented.