Skip to content

Commit

Permalink
contrib/initrd hooks: properly quote @LIBFETCH_SONAME@
Browse files Browse the repository at this point in the history
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 34eef3e (#12760),
which broke this

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
  • Loading branch information
nabijaczleweli committed Dec 11, 2021
1 parent 076cea6 commit 7945730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contrib/dracut/90zfs/module-setup.sh.in
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions contrib/initramfs/hooks/zfs.in
Expand Up @@ -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
Expand Down

0 comments on commit 7945730

Please sign in to comment.