diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-11-22 20:51:15 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-11-22 20:52:56 +0100 |
commit | c049acb22e6af24fdb1afff867daa8bed37a86a2 (patch) | |
tree | 3c8910d1e88b00650a22c61310682ed0b29a8206 | |
parent | 2fd1beb3e20cbd9c9a2f9d37bf301f596116b475 (diff) | |
download | systemd-c049acb22e6af24fdb1afff867daa8bed37a86a2.tar.gz |
test: fix a couple of "new" shellcheck-related issues
related to https://github.com/koalaman/shellcheck/wiki/SC2295
-rw-r--r-- | test/test-functions | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test-functions b/test/test-functions index 00a808bf28..d3705653ae 100644 --- a/test/test-functions +++ b/test/test-functions @@ -2083,7 +2083,7 @@ dfatal() { # Generic substring function. If $2 is in $1, return 0. -strstr() { [ "${1#*$2*}" != "$1" ]; } +strstr() { [ "${1#*"$2"*}" != "$1" ]; } # normalize_path <path> # Prints the normalized path, where it removes any duplicated @@ -2498,12 +2498,12 @@ image_install() { install_kmod_with_fw() { local module="${1:?}" # no need to go further if the module is already installed - [[ -e "${initdir:?}/lib/modules/${KERNEL_VER:?}/${module##*/lib/modules/$KERNEL_VER/}" ]] && return 0 + [[ -e "${initdir:?}/lib/modules/${KERNEL_VER:?}/${module##*"/lib/modules/$KERNEL_VER/"}" ]] && return 0 [[ -e "$initdir/.kernelmodseen/${module##*/}" ]] && return 0 [ -d "$initdir/.kernelmodseen" ] && : >"$initdir/.kernelmodseen/${module##*/}" - inst_simple "$module" "/lib/modules/$KERNEL_VER/${module##*/lib/modules/$KERNEL_VER/}" || return $? + inst_simple "$module" "/lib/modules/$KERNEL_VER/${module##*"/lib/modules/$KERNEL_VER/"}" || return $? local modname="${module##*/}" local fwdir found fw |