master - vgimportclone.sh: add -r to read
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=16a38dede95cbcd7bfd80bb2124ce205a20c5a2f Commit: 16a38dede95cbcd7bfd80bb2124ce205a20c5a2f Parent: 588b12e71d7f050ca14e6f9332e7a0ec6b66a4b8 Author: Zdenek Kabelac <[email protected]> AuthorDate: Wed Jun 28 20:26:23 2017 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Jun 29 22:23:16 2017 +0200
vgimportclone.sh: add -r to read
read without -r will mangle backslashes.
--- scripts/vgimportclone.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
scripts/vgimportclone.sh +2 -2
@@ -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?"