]> sourceware.org Git - lvm2.git/commitdiff
vgimportclone.sh: add -r to read
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 28 Jun 2017 18:26:23 +0000 (20:26 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 29 Jun 2017 20:23:16 +0000 (22:23 +0200)
read without -r will mangle backslashes.

scripts/vgimportclone.sh

index 26e4c1f7c51753e18a7e80f4f0ca5a9c0775477c..48ac6ce12bc4a46fc29ea79a2b8f9ff1555cbe85 100755 (executable)
@@ -259,7 +259,7 @@ NOVGDEVLIST=$("$LVM" pvs -a -o pv_name --select vg_name="" --noheadings)
 checkvalue $? "Failed to collect information for PV check"
 if [ -n "${NOVGDEVLIST}" ]; then
     FOLLOWLIST=""
-    while read PVNAME; do
+    while read -r PVNAME; do
         FOLLOW=$("$READLINK" "$PVNAME")
         FOLLOWLIST="$FOLLOWLIST $FOLLOW"
     done <<< "$(echo "$NOVGDEVLIST")"
@@ -272,7 +272,7 @@ fi
 VGLIST=$("$LVM" vgs -o vg_name,vg_exported,vg_missing_pv_count --noheadings --binary)
 checkvalue $? "Failed to collect VG information"
 
-while read VGNAME VGEXPORTED VGMISSINGPVCOUNT; do
+while read -r VGNAME VGEXPORTED VGMISSINGPVCOUNT; do
     if [ "$VGMISSINGPVCOUNT" -gt 0 ]; then
         echo "Volume Group ${VGNAME} has unknown PV(s), skipping."
         echo "- Were all associated PV(s) supplied as arguments?"
This page took 0.034841 seconds and 5 git commands to generate.