Skip to contentSkip to conversation

master - vgimportclone.sh: do not quote regex

PATCH Zdenek Kabelac 1 participant 1 message Jun 29, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=afa0bd916e9b54530ad2eb99373c836c5396ea4f
Commit:        afa0bd916e9b54530ad2eb99373c836c5396ea4f
Parent:        ef4506069a1a29cd00532e36c24df9a01cd32600
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Jun 29 18:54:26 2017 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Jun 29 22:23:16 2017 +0200

vgimportclone.sh: do not quote regex

Don't quote rhs of =~, it'll match literally rather than as a regex.

---
 scripts/vgimportclone.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/vgimportclone.sh +1 -1
index 7d3118f..783857e 100755
@@ -48,7 +48,7 @@ function getvgname {
     NAME="${BNAME}"
     I=0
 
-    while [[ "${VGLIST}" =~ ":${NAME}:" ]]
+    while [[ "${VGLIST}" =~ :${NAME}: ]]
     do
         I=$(( I + 1 ))
         NAME="${BNAME}$I"