Closed danyspin97 closed 5 years ago
Thanks for the patch!
Unfortunately, i don't get this, sorry.
You mean that on elogind systems, MODULE_LOAD_DIR would be empty?
But it seems to not fix anything in that regards: if we are on an elogind system and we want to install DDCUtil support, we still reach pkg_get_variable(MODULE_LOAD_DIR systemd modulesloaddir)
.
Is there anything i am missing?
You mean that on elogind systems, MODULE_LOAD_DIR would be empty?
Yea, it would be empty. That's a problem because install
need a non empty destination directory and we feed it with a variable that can be empty.
pkg_get_variable
is still called and it doesn't fail if systemd
is not found (REQUIRED
flag is not set). With this PR we check if systemd
is installed (SYSTEMD_LIBS_FOUND
) before installing the module file. Therefore install
is reached only if MODULES_LOAD_DIR
is set.
I understand now, thanks.
Is there a /usr/lib/modules-load.d/
equivalent for non-systemd systems? I'd like to keep this feature (ie: if an user desires DDCUtil support, its modules should be automatically loaded for him/her).
EDIT: quickly googling it...and unfortunately it seems there is no standard way...eg: openrc uses /etc/openrc/conf.d/modules
.
Destination for additional files, installed along ddcutil support, was dependant on systemd. Systemd installation is checked before calling MODULE_LOAD_DIR.