aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Gombos <laszlo.gombos@gmail.com>2021-11-19 12:45:20 -0500
committerJóhann B. Guðmundsson <johannbg@gmail.com>2021-11-23 05:53:33 +0000
commitbf8738d31ca53ad6410c46c1f9b2a4a12273b9a3 (patch)
tree34493f0ebc4a1fd40b5931407c44e619a3b181df
parentf905c3a72c975cf6006f266755cc91229132c739 (diff)
downloaddracut-bf8738d31ca53ad6410c46c1f9b2a4a12273b9a3.tar.gz
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.
-rwxr-xr-xmodules.d/90dmsquash-live/module-setup.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules.d/90dmsquash-live/module-setup.sh b/modules.d/90dmsquash-live/module-setup.sh
index bae9afd7..65766e83 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
}