From c049acb22e6af24fdb1afff867daa8bed37a86a2 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 22 Nov 2021 20:51:15 +0100 Subject: [PATCH] test: fix a couple of "new" shellcheck-related issues related to https://github.com/koalaman/shellcheck/wiki/SC2295 --- test/test-functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-functions b/test/test-functions index 00a808bf28d..d3705653ae2 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 # 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