From: Laszlo Gombos Date: Fri, 19 Nov 2021 17:45:20 +0000 (-0500) Subject: fix(dmsquash-live): do not install systemd files when systemd is not enabled X-Git-Tag: 056~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf8738d31ca53ad6410c46c1f9b2a4a12273b9a3;p=thirdparty%2Fdracut.git 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. --- diff --git a/modules.d/90dmsquash-live/module-setup.sh b/modules.d/90dmsquash-live/module-setup.sh index bae9afd7a..65766e830 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 }