From 5f28cd09d28c6c73775b318fa7b6d216e76e51f4 Mon Sep 17 00:00:00 2001 From: illiliti Date: Wed, 4 Aug 2021 20:15:07 +0300 Subject: [PATCH] lib/helper.sh: fix shellcheck --- lib/helper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/helper.sh b/lib/helper.sh index 916417f..778501a 100755 --- a/lib/helper.sh +++ b/lib/helper.sh @@ -16,9 +16,10 @@ create_symlink() } exec > /dev/null 2>&1 +dev_name=${DEVPATH##*/} [ "$MODALIAS" ] && modprobe "$MODALIAS" -[ "$SUBSYSTEM" = block ] && [ -b "/dev/${dev_name=${DEVPATH##*/}}" ] || exit 1 +[ "$SUBSYSTEM" = block ] && [ -b "/dev/${dev_name}" ] || exit 1 read -r dm_name < "/sys/block/${dev_name}/dm/name" && { mkdir -p /dev/mapper