]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
perf(systemd-initrd): do not depend on base module
authorJo Zzsi <jozzsicsataban@gmail.com>
Wed, 18 Sep 2024 02:20:07 +0000 (22:20 -0400)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Thu, 19 Sep 2024 12:42:00 +0000 (08:42 -0400)
Make sure /etc/initrd exist.

Test SYSTEMD-INITRD confirms no regression as this tests
now no longer includes the base module and it still passes
the boot tests with systemd (hence the perf tag).

modules.d/01systemd-initrd/module-setup.sh

index ad004948cb9beb41063875217a935c1630620fa4..fd6907e2f8ab5c9fe662e479d068879033689e42 100755 (executable)
@@ -10,11 +10,16 @@ check() {
 
 # called by dracut
 depends() {
-    echo base systemd-udevd systemd-journald systemd-tmpfiles
+    echo systemd-udevd systemd-journald systemd-tmpfiles
 }
 
 # called by dracut
 install() {
+    # The existence of this file is required
+    if ! [[ -e "$initdir/etc/initrd-release" ]]; then
+        : > "$initdir/etc/initrd-release"
+    fi
+
     inst_multiple -o \
         "$systemdsystemunitdir"/initrd.target \
         "$systemdsystemunitdir"/initrd-fs.target \