diff --git a/config/user-libfetch.m4 b/config/user-libfetch.m4 index f5149fc1a..d961c6ca7 100644 --- a/config/user-libfetch.m4 +++ b/config/user-libfetch.m4 @@ -32,7 +32,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBFETCH], [ have_libfetch=1 LIBFETCH_IS_FETCH=1 LIBFETCH_DYNAMIC=1 - LIBFETCH_SONAME='"libfetch.so.6"' + LIBFETCH_SONAME="libfetch.so.6" LIBFETCH_LIBS="-ldl" AC_MSG_RESULT([fetch(3)]) ], []) @@ -45,7 +45,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBFETCH], [ LIBFETCH_IS_LIBCURL=1 if test "$(curl-config --built-shared)" = "yes"; then LIBFETCH_DYNAMIC=1 - LIBFETCH_SONAME='"libcurl.so.4"' + LIBFETCH_SONAME="libcurl.so.4" LIBFETCH_LIBS="-ldl" AC_MSG_RESULT([libcurl]) else @@ -67,5 +67,5 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBFETCH], [ AC_DEFINE_UNQUOTED([LIBFETCH_IS_FETCH], [$LIBFETCH_IS_FETCH], [libfetch is fetch(3)]) AC_DEFINE_UNQUOTED([LIBFETCH_IS_LIBCURL], [$LIBFETCH_IS_LIBCURL], [libfetch is libcurl]) AC_DEFINE_UNQUOTED([LIBFETCH_DYNAMIC], [$LIBFETCH_DYNAMIC], [whether the chosen libfetch is to be loaded at run-time]) - AC_DEFINE_UNQUOTED([LIBFETCH_SONAME], [$LIBFETCH_SONAME], [soname of chosen libfetch]) + AC_DEFINE_UNQUOTED([LIBFETCH_SONAME], ["$LIBFETCH_SONAME"], [soname of chosen libfetch]) ]) diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index c27f905bf..fbf32b658 100755 --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in @@ -61,9 +61,9 @@ install() { dracut_install /usr/lib*/gcc/**/libgcc_s.so* fi # shellcheck disable=SC2050 - if [ @LIBFETCH_DYNAMIC@ != 0 ]; then + if [ @LIBFETCH_DYNAMIC@ -gt 0 ]; then for d in $libdirs; do - [ -e "$d/"@LIBFETCH_SONAME@ ] && dracut_install "$d/"@LIBFETCH_SONAME@ + [ -e "$d/@LIBFETCH_SONAME@" ] && dracut_install "$d/@LIBFETCH_SONAME@" done fi dracut_install @mounthelperdir@/mount.zfs diff --git a/contrib/initramfs/hooks/zfs.in b/contrib/initramfs/hooks/zfs.in index bdf169fd9..546841e6c 100755 --- a/contrib/initramfs/hooks/zfs.in +++ b/contrib/initramfs/hooks/zfs.in @@ -31,8 +31,8 @@ find /lib/ -type f -name "libgcc_s.so.[1-9]" | while read -r libgcc; do done # shellcheck disable=SC2050 -if [ @LIBFETCH_DYNAMIC@ != 0 ]; then - find /lib/ -name @LIBFETCH_SONAME@ | while read -r libfetch; do +if [ @LIBFETCH_DYNAMIC@ -gt 0 ]; then + find /lib/ -name "@LIBFETCH_SONAME@" | while read -r libfetch; do copy_exec "$libfetch" done fi