]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(dracut-init): add compatibility with Debian/Ubuntu for libdirs detection
authorJo Zzsi <jozzsicsataban@gmail.com>
Wed, 13 Nov 2024 11:44:39 +0000 (06:44 -0500)
committerBenjamin Drung <bdrung@ubuntu.com>
Fri, 15 Nov 2024 13:25:16 +0000 (14:25 +0100)
Make sure if /lib/ is included in libdirs when needed.

This change is required for multipath dracut module to work properly
on Debian/Ubuntu based distributions.

dracut-init.sh
test/TEST-41-FULL-SYSTEMD/test.sh

index 80d72fb430365c6df0d5da0849cc55c6611e9f68..c01fc687155b561e710718b0ec052cef4ab1dc99 100755 (executable)
@@ -91,7 +91,10 @@ if ! [[ $libdirs ]]; then
         && [[ -d $dracutsysrootdir/lib64 ]]; then
         libdirs+=" /lib64"
         [[ -d $dracutsysrootdir/usr/lib64 ]] && libdirs+=" /usr/lib64"
-    else
+
+    fi
+
+    if [[ -d $dracutsysrootdir/lib ]]; then
         libdirs+=" /lib"
         [[ -d $dracutsysrootdir/usr/lib ]] && libdirs+=" /usr/lib"
     fi
index 60643d9c02341d1d60a2629f4688e70abec8d368..13f7b4fd153a136b57670995f45bb14123e024ab 100755 (executable)
@@ -138,9 +138,8 @@ EOF
 
     grep -F -a -m 1 ID_FS_UUID "$TESTDIR"/marker.img > "$TESTDIR"/luks.uuid
 
-    # TODO switch back to -a from -m after https://github.com/dracut-ng/dracut-ng/issues/685 is fixed, otherwise this test fails on Ubuntu
     test_dracut \
-        -m "resume dracut-systemd systemd-ac-power systemd-battery-check systemd-bsod systemd-coredump systemd-creds systemd-cryptsetup systemd-integritysetup systemd-ldconfig systemd-pcrphase systemd-pstore systemd-repart systemd-sysext systemd-veritysetup" \
+        -a "resume dracut-systemd systemd-ac-power systemd-battery-check systemd-bsod systemd-coredump systemd-creds systemd-cryptsetup systemd-integritysetup systemd-ldconfig systemd-pcrphase systemd-pstore systemd-repart systemd-sysext systemd-veritysetup" \
         --add-drivers "btrfs" \
         "$TESTDIR"/initramfs.testing