diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2017-06-28 20:26:23 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2017-06-29 22:23:16 +0200 |
commit | 16a38dede95cbcd7bfd80bb2124ce205a20c5a2f (patch) | |
tree | 8f6105054996b5f848c15bc2664bd8a0eec9b21a /scripts/vgimportclone.sh | |
parent | 588b12e71d7f050ca14e6f9332e7a0ec6b66a4b8 (diff) | |
download | lvm2-16a38dede95cbcd7bfd80bb2124ce205a20c5a2f.tar.gz |
vgimportclone.sh: add -r to read
read without -r will mangle backslashes.
Diffstat (limited to 'scripts/vgimportclone.sh')
-rwxr-xr-x | scripts/vgimportclone.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vgimportclone.sh b/scripts/vgimportclone.sh index 26e4c1f7c..48ac6ce12 100755 --- a/scripts/vgimportclone.sh +++ b/scripts/vgimportclone.sh @@ -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?" |