From 153f7c9f72082d7ef5ee27fcbec1bcb94ba88151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sat, 11 Dec 2021 02:41:23 +0100 Subject: [PATCH] contrib/initrd hooks: properly quote @LIBFETCH_SONAME@ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e9a7a74d24a59d016051d547afc55dbaa0 (#12760), which broke this Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #12835 --- contrib/dracut/90zfs/module-setup.sh.in | 4 ++-- contrib/initramfs/hooks/zfs.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index 10f915b2ef..edc9955bf4 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@ != 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 176a1568ec..9d5c397cf2 100755 --- a/contrib/initramfs/hooks/zfs.in +++ b/contrib/initramfs/hooks/zfs.in @@ -30,8 +30,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@ != 0 ]; then + find /lib/ -name @LIBFETCH_SONAME@ | while read -r libfetch; do copy_exec "$libfetch" done fi