troglobit / finit

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

modules.load.d module load always shows "OK" even on fail when booting #241

Closed hongkongkiwi closed 2 years ago

hongkongkiwi commented 2 years ago

Small bug, I had accidentally left some .ko modules in /etc/modules-load.d/*.conf file that were no longer on my rootfs.

finit shows "OK" upon load .... [ OK ] Kernel module: qmi_wwan.ko

When infact in initctl status it shows as failed (as it should since the .ko file does not exist). 0 modprobe.qmi_wwan.ko:19 failed [--2345----] Kernel module: qmi_wwan.ko

I removed the missing .ko config so it's not actually an issue for me, but it seems like it could be confusing if you were expecting it to show Fail in the load screen if the .ko was missing.

troglobit commented 2 years ago

Thanks, will look into it!

troglobit commented 2 years ago

This turned out to be by-design. The modules-load plugin installs 'task [2345] /sbin/modprobe foo.ko' stanzas, meaning Finit will launch a background modprobe and happily continue with other things in parallel. As long as /sbin/modprobe exists and can be executed, Finit will show [ OK ]. The idea is to use initctl after boot to verify how it went.

Use the legacy finit.conf module foo.ko directive instead if you want to block execution while waiting for the result of the command. (The modprobe plugin is usually better than both of these ...)

Closing with won't fix, since it's not a bug.