From 0ba34033237eb447f893cb183b4aefbf084642c8 Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Fri, 12 Dec 2025 23:08:51 +0000 Subject: [PATCH] Change shellcheck and checkbashism triggers. Newer versions of `shellcheck` and `checkbashism` finds more than previous, so fix those. Reviewed by: Brian Behlendorf Reviewed-by: Rob Norris Signed-off-by: Turbo Fredriksson Closes #18000 --- contrib/initramfs/scripts/zfs | 4 ++-- scripts/paxcheck.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs index d23a15bb2..9d2c086ff 100644 --- a/contrib/initramfs/scripts/zfs +++ b/contrib/initramfs/scripts/zfs @@ -446,7 +446,7 @@ decrypt_fs() echo "${ENCRYPTIONROOT}" > /run/zfs_fs_name # If root dataset is encrypted... - if ! [ "${ENCRYPTIONROOT}" = "-" ] + if [ "${ENCRYPTIONROOT}" != "-" ] then KEYSTATUS="$(get_fs_value "${ENCRYPTIONROOT}" keystatus)" # Continue only if the key needs to be loaded @@ -465,7 +465,7 @@ decrypt_fs() done # Do not prompt if key is stored noninteractively, - if ! [ "${KEYLOCATION}" = "prompt" ] + if [ "${KEYLOCATION}" != "prompt" ] then "${ZFS}" load-key "${ENCRYPTIONROOT}" diff --git a/scripts/paxcheck.sh b/scripts/paxcheck.sh index aba770e9e..475f84def 100755 --- a/scripts/paxcheck.sh +++ b/scripts/paxcheck.sh @@ -10,7 +10,7 @@ RET=0 # check for exec stacks OUT=$(scanelf -qyRAF '%e %p' "$1") -if [ x"${OUT}" != x ]; then +if [ "${OUT}" != "" ]; then RET=2 echo "The following files contain writable and executable sections" echo " Files with such sections will not work properly (or at all!) on some" @@ -26,7 +26,7 @@ fi # check for TEXTRELS OUT=$(scanelf -qyRAF '%T %p' "$1") -if [ x"${OUT}" != x ]; then +if [ "${OUT}" != "" ]; then RET=2 echo "The following files contain runtime text relocations" echo " Text relocations force the dynamic linker to perform extra"