From bf8738d31ca53ad6410c46c1f9b2a4a12273b9a3 Mon Sep 17 00:00:00 2001 From: Laszlo Gombos Date: Fri, 19 Nov 2021 12:45:20 -0500 Subject: [PATCH] fix(dmsquash-live): do not install systemd files when systemd is not enabled Systemd is an optional module for the dmsquash-live module. This scenario is properly handled for other modules (for example livenet module) but not for dmsquash-live module. --- modules.d/90dmsquash-live/module-setup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules.d/90dmsquash-live/module-setup.sh b/modules.d/90dmsquash-live/module-setup.sh index bae9afd7ad..65766e8306 100755 --- a/modules.d/90dmsquash-live/module-setup.sh +++ b/modules.d/90dmsquash-live/module-setup.sh @@ -31,9 +31,11 @@ install() { inst_hook pre-pivot 20 "$moddir/apply-live-updates.sh" inst_script "$moddir/dmsquash-live-root.sh" "/sbin/dmsquash-live-root" inst_script "$moddir/iso-scan.sh" "/sbin/iso-scan" - inst_script "$moddir/dmsquash-generator.sh" "$systemdutildir"/system-generators/dracut-dmsquash-generator + if dracut_module_included "systemd-initrd"; then + inst_script "$moddir/dmsquash-generator.sh" "$systemdutildir"/system-generators/dracut-dmsquash-generator + inst_simple "$moddir/checkisomd5@.service" "/etc/systemd/system/checkisomd5@.service" + fi # should probably just be generally included inst_rules 60-cdrom_id.rules - inst_simple "$moddir/checkisomd5@.service" "/etc/systemd/system/checkisomd5@.service" dracut_need_initqueue }