lib/helper.sh: fix shellcheck

This commit is contained in:
illiliti 2021-08-04 20:15:07 +03:00
parent 2c8c8cd959
commit 5f28cd09d2

View File

@ -16,9 +16,10 @@ create_symlink()
} }
exec > /dev/null 2>&1 exec > /dev/null 2>&1
dev_name=${DEVPATH##*/}
[ "$MODALIAS" ] && modprobe "$MODALIAS" [ "$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" && { read -r dm_name < "/sys/block/${dev_name}/dm/name" && {
mkdir -p /dev/mapper mkdir -p /dev/mapper