From bb6fd1a15f32d79ddaa351704dea47ad9e5ab9be Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 21 Sep 2021 18:02:50 +0200 Subject: shellcheck: warning enhancements --- scripts/lvm_import_vdo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/lvm_import_vdo.sh b/scripts/lvm_import_vdo.sh index af7917b0c..61a82e41e 100755 --- a/scripts/lvm_import_vdo.sh +++ b/scripts/lvm_import_vdo.sh @@ -262,7 +262,7 @@ convert2lvm_() { if [ -z "$VGNAME" ] || [ "$VGNAME" = "$LVNAME" ] ; then VGNAME=${DEFAULT_NAME%/*} # Find largest matching VG name to our 'default' vgname - LASTVGNAME=$(LC_ALL=C "$LVM" vgs -oname -O-name --noheadings -S name=~${VGNAME} | grep -E "$VGNAME[0-9]? ?" | head -1 || true) + LASTVGNAME=$(LC_ALL=C "$LVM" vgs -oname -O-name --noheadings -S name=~${VGNAME} | grep -E "${VGNAME}[0-9]? ?" | head -1 || true) if test -n "$LASTVGNAME" ; then LASTVGNAME=${LASTVGNAME#*${VGNAME}} # If the number is becoming too high, try some random number -- cgit v1.2.1