diff --git a/contrib/debian/fwupd.install b/contrib/debian/fwupd.install index 2e0ab7199..551cd309a 100644 --- a/contrib/debian/fwupd.install +++ b/contrib/debian/fwupd.install @@ -9,6 +9,7 @@ usr/share/polkit-1/* usr/share/locale usr/share/metainfo/* usr/libexec/fwupd/* +usr/lib/modules-load.d/*.conf usr/share/man/man1/* lib/systemd/system/* lib/systemd/system-preset/* diff --git a/contrib/fwupd.spec.in b/contrib/fwupd.spec.in index c18138276..fb354d1a9 100644 --- a/contrib/fwupd.spec.in +++ b/contrib/fwupd.spec.in @@ -335,9 +335,9 @@ mkdir -p --mode=0700 $RPM_BUILD_ROOT%{_localstatedir}/lib/fwupd/gnupg %config(noreplace)%{_sysconfdir}/pki/fwupd %{_sysconfdir}/pki/fwupd-metadata %if 0%{?have_msr} -%{_sysconfdir}/modules-load.d/fwupd-msr.conf +/usr/lib/modules-load.d/fwupd-msr.conf %endif -%{_sysconfdir}/modules-load.d/fwupd-platform-integrity.conf +/usr/lib/modules-load.d/fwupd-platform-integrity.conf %{_datadir}/dbus-1/system.d/org.freedesktop.fwupd.conf %{_datadir}/bash-completion/completions/fwupdmgr %{_datadir}/bash-completion/completions/fwupdtool diff --git a/meson.build b/meson.build index a55d44076..69b526528 100644 --- a/meson.build +++ b/meson.build @@ -384,10 +384,12 @@ if build_standalone and get_option('systemd') systemdunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir') systemdsystempresetdir = systemd.get_pkgconfig_variable('systemdsystempresetdir') systemd_shutdown_dir = systemd.get_pkgconfig_variable('systemdshutdowndir') + systemd_modules_load_dir = systemd.get_pkgconfig_variable('modulesloaddir') else systemdunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir', define_variable: ['rootprefix', systemd_root_prefix]) systemdsystempresetdir = systemd.get_pkgconfig_variable('systemdsystempresetdir', define_variable: ['rootprefix', systemd_root_prefix]) systemd_shutdown_dir = systemd.get_pkgconfig_variable('systemdshutdowndir', define_variable: [systemd.version().version_compare('>= 246') ? 'root_prefix' : 'rootprefix', systemd_root_prefix]) + systemd_modules_load_dir = systemd.get_pkgconfig_variable('modulesloaddir', define_variable: ['rootprefix', systemd_root_prefix]) endif else libsystemd = dependency('', required: false) diff --git a/plugins/msr/meson.build b/plugins/msr/meson.build index d829e1530..b8c87ced7 100644 --- a/plugins/msr/meson.build +++ b/plugins/msr/meson.build @@ -4,9 +4,11 @@ install_data(['msr.quirk'], install_dir: join_paths(datadir, 'fwupd', 'quirks.d') ) +if get_option('systemd') install_data(['fwupd-msr.conf'], - install_dir: join_paths(sysconfdir, 'modules-load.d') + install_dir: systemd_modules_load_dir, ) +endif shared_module('fu_plugin_msr', fu_hash, diff --git a/plugins/platform-integrity/meson.build b/plugins/platform-integrity/meson.build index 6f1c4bc51..04cc44973 100644 --- a/plugins/platform-integrity/meson.build +++ b/plugins/platform-integrity/meson.build @@ -6,9 +6,11 @@ install_data([ install_dir: join_paths(datadir, 'fwupd', 'quirks.d') ) +if get_option('systemd') install_data(['fwupd-platform-integrity.conf'], - install_dir: join_paths(sysconfdir, 'modules-load.d') + install_dir: systemd_modules_load_dir, ) +endif shared_module('fu_plugin_platform_integrity', fu_hash, diff --git a/snap/hooks/install b/snap/hooks/install index 3302ab62e..f4e36aa32 100755 --- a/snap/hooks/install +++ b/snap/hooks/install @@ -20,4 +20,4 @@ systemctl daemon-reload systemctl enable fwupd-activate systemctl start fwupd-activate #msr module -install_if_missing etc/modules-load.d/fwupd-msr.conf / +install_if_missing lib/modules-load.d/fwupd-msr.conf / diff --git a/snap/hooks/remove b/snap/hooks/remove index 350838419..c62f59f09 100755 --- a/snap/hooks/remove +++ b/snap/hooks/remove @@ -6,4 +6,4 @@ systemctl disable fwupd-activate rm /etc/systemd/system/fwupd-activate.service -f systemctl daemon-reload #msr module -rm /etc/modules-load.d/fwupd-msr.conf -f +rm /usr/lib/modules-load.d/fwupd-msr.conf -f