From: Jo Zzsi Date: Mon, 26 May 2025 00:21:42 +0000 (-0400) Subject: fix(systemd): make checking for systemd availability consistent X-Git-Tag: 108~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e575556da2bc6d41265fdffd4c4bf7bd69ab71e;p=thirdparty%2Fdracut-ng.git fix(systemd): make checking for systemd availability consistent The best way to check if systemd is available is to check for the systemd dracut module. Most of the existing code does this already, fix the remaining few places where it does not. --- diff --git a/modules.d/70dmsquash-live/module-setup.sh b/modules.d/70dmsquash-live/module-setup.sh index ae0dee0f6..5601346ee 100755 --- a/modules.d/70dmsquash-live/module-setup.sh +++ b/modules.d/70dmsquash-live/module-setup.sh @@ -31,7 +31,7 @@ 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" - if dracut_module_included "systemd-initrd"; then + if dracut_module_included "systemd"; then inst_script "$moddir/dmsquash-generator.sh" "$systemdutildir"/system-generators/dracut-dmsquash-generator inst_simple "$moddir/checkisomd5@.service" "/etc/systemd/system/checkisomd5@.service" fi diff --git a/modules.d/70livenet/module-setup.sh b/modules.d/70livenet/module-setup.sh index d1f55ceda..3ec6baf4c 100755 --- a/modules.d/70livenet/module-setup.sh +++ b/modules.d/70livenet/module-setup.sh @@ -17,7 +17,7 @@ install() { inst_hook cmdline 29 "$moddir/parse-livenet.sh" inst_hook initqueue/online 95 "$moddir/fetch-liveupdate.sh" inst_script "$moddir/livenetroot.sh" "/sbin/livenetroot" - if dracut_module_included "systemd-initrd"; then + if dracut_module_included "systemd"; then inst_script "$moddir/livenet-generator.sh" "$systemdutildir"/system-generators/dracut-livenet-generator fi } diff --git a/modules.d/74nbd/module-setup.sh b/modules.d/74nbd/module-setup.sh index 06154a620..2ad45a0a2 100755 --- a/modules.d/74nbd/module-setup.sh +++ b/modules.d/74nbd/module-setup.sh @@ -32,7 +32,7 @@ install() { inst nbd-client inst_hook cmdline 90 "$moddir/parse-nbdroot.sh" inst_script "$moddir/nbdroot.sh" "/sbin/nbdroot" - if dracut_module_included "systemd-initrd"; then + if dracut_module_included "systemd"; then inst_script "$moddir/nbd-generator.sh" "$systemdutildir"/system-generators/dracut-nbd-generator fi }