From: Jo Zzsi Date: Wed, 13 Nov 2024 11:44:39 +0000 (-0500) Subject: fix(dracut-init): add compatibility with Debian/Ubuntu for libdirs detection X-Git-Tag: 106~185 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8809b2468aa2e3fd2ce4ff99f1cc4d400a190cf2;p=thirdparty%2Fdracut-ng.git fix(dracut-init): add compatibility with Debian/Ubuntu for libdirs detection 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. --- diff --git a/dracut-init.sh b/dracut-init.sh index 80d72fb43..c01fc6871 100755 --- a/dracut-init.sh +++ b/dracut-init.sh @@ -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 diff --git a/test/TEST-41-FULL-SYSTEMD/test.sh b/test/TEST-41-FULL-SYSTEMD/test.sh index 60643d9c0..13f7b4fd1 100755 --- a/test/TEST-41-FULL-SYSTEMD/test.sh +++ b/test/TEST-41-FULL-SYSTEMD/test.sh @@ -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