From 998035d534bfa7c827168fc7a7f4bfec504ac5d5 Mon Sep 17 00:00:00 2001 From: наб Date: Sun, 23 May 2021 15:48:26 +0200 Subject: dracut: 90zfs: module-setup: try /lib*/libgcc_s.so*, relax /u/l/gcc path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SUSE stores the library at /lib64/libgcc_s.so.1 (/lib/libgcc_s.so.1 for i686 glibc), which is in the search path Also relax the /usr/lib path to catch systems similar to SUSE (/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so) but without the top-level lib64 Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia Ziemiańska Closes #11750 Closes #12108 --- contrib/dracut/90zfs/module-setup.sh.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'contrib/dracut/90zfs') diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index 90d4cfc63..1e97e674d 100755 --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in @@ -49,13 +49,16 @@ install() { # On systems with gcc-config (Gentoo, Funtoo, etc.): # Use the current profile to resolve the appropriate path s="$(gcc-config -c)" - dracut_install "/usr/lib/gcc/${s%-*}/${s##*-}/libgcc_s.so.1" - elif ls /usr/lib/libgcc_s.so* >/dev/null 2>&1; then + dracut_install "/usr/lib/gcc/${s%-*}/${s##*-}/libgcc_s.so"* + elif [ "$(echo /usr/lib/libgcc_s.so*)" != "/usr/lib/libgcc_s.so*" ]; then # Try a simple path first dracut_install /usr/lib/libgcc_s.so* + elif [ "$(echo /lib*/libgcc_s.so*)" != "/lib*/libgcc_s.so*" ]; then + # SUSE + dracut_install /lib*/libgcc_s.so* else # Fallback: Guess the path and include all matches - dracut_install /usr/lib/gcc/*/*/libgcc_s.so* + dracut_install /usr/lib*/gcc/**/libgcc_s.so* fi dracut_install @mounthelperdir@/mount.zfs dracut_install @udevdir@/vdev_id -- cgit v1.2.3