Skip to content

Commit bf8738d

Browse files
LaszloGombosjohannbg
authored andcommitted
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.
1 parent f905c3a commit bf8738d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules.d/90dmsquash-live/module-setup.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ install() {
3131
inst_hook pre-pivot 20 "$moddir/apply-live-updates.sh"
3232
inst_script "$moddir/dmsquash-live-root.sh" "/sbin/dmsquash-live-root"
3333
inst_script "$moddir/iso-scan.sh" "/sbin/iso-scan"
34-
inst_script "$moddir/dmsquash-generator.sh" "$systemdutildir"/system-generators/dracut-dmsquash-generator
34+
if dracut_module_included "systemd-initrd"; then
35+
inst_script "$moddir/dmsquash-generator.sh" "$systemdutildir"/system-generators/dracut-dmsquash-generator
36+
inst_simple "$moddir/[email protected]" "/etc/systemd/system/[email protected]"
37+
fi
3538
# should probably just be generally included
3639
inst_rules 60-cdrom_id.rules
37-
inst_simple "$moddir/[email protected]" "/etc/systemd/system/[email protected]"
3840
dracut_need_initqueue
3941
}

0 commit comments

Comments
 (0)