fixed check in pv creation

This commit is contained in:
Tobias Powalowski 2009-07-30 20:57:00 +02:00
parent d1fe24c2f0
commit 414eb5b602

View file

@ -1178,7 +1178,9 @@ _createpv()
# skip already encrypted volume devices
for devpath in $(ls /dev/mapper/ 2>/dev/null | grep -v control); do
realdevice="$(cryptsetup status $devpath 2>/dev/null | grep "device:.*/dev/mapper/" | sed -e 's#.*\ ##g')"
if ! [ "$realdevice" = "" ]; then
[ "$(lvs $realdevice 2>/dev/null)" ] && ALREADYINUSE="$ALREADYINUSE /dev/mapper/$devpath"
fi
done
# skip md devices, which already have lvm devices!
for i in $PARTS; do