[Ovirt-devel] [PATCH node] only wipe HostVG if storage_init is not passed in dracut
Mike Burns
mburns at redhat.com
Fri Sep 9 19:11:41 UTC 2011
rhbz#736971
Signed-off-by: Mike Burns <mburns at redhat.com>
---
dracut/ovirt-cleanup.sh | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/dracut/ovirt-cleanup.sh b/dracut/ovirt-cleanup.sh
index c96d6fe..e9674d8 100755
--- a/dracut/ovirt-cleanup.sh
+++ b/dracut/ovirt-cleanup.sh
@@ -48,11 +48,16 @@ fi
# Check for HostVG
lvm pvscan >/dev/null 2>&1
-for hostvg in $(lvm pvs --noheadings -o vg_name,pv_name 2>/dev/null | awk '/^ HostVG/{print $2}'); do
- storage_init="$hostvg,$storage_init"
- info "Found HostVG on $hostvg"
-done
-
+if [ -z "$storage_init" ]; then
+ for hostvg in $(lvm pvs --noheadings -o vg_name,pv_name 2>/dev/null | awk '/^ HostVG/{print $2}'); do
+ if [ -z "$storage_init" ]; then
+ storage_init="$hostvg"
+ else
+ storage_init="$hostvg,$storage_init"
+ fi
+ info "Found HostVG on $hostvg"
+ done
+fi
# storage_init is passed in a specific format
# A comma separated list of HostVG devices
--
1.7.4.4
More information about the ovirt-devel
mailing list