1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-25 21:57:45 +03:00

vgimportclone.sh: add -r to read

read without -r will mangle backslashes.
This commit is contained in:
Zdenek Kabelac 2017-06-28 20:26:23 +02:00
parent 588b12e71d
commit 16a38dede9

View File

@ -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?"