[Ovirt-devel] [PATCH node] prevent hostvg and sharedroot from accepting same drive input
Joey Boggs
jboggs at redhat.com
Fri Jan 29 21:34:09 UTC 2010
---
scripts/ovirt-config-storage | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index 17938ec..460588b 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -243,8 +243,19 @@ do_configure()
set /files$OVIRT_DEFAULTS/OVIRT_ROOT_INSTALL $OVIRT_ROOT_INSTALL
EOF
printf "\n\nPlease select the disk to use for the HostVG.\n\n"
- HOSTVGDRIVE=$(get_dev_name) || return 0
- get_drive_size $HOSTVGDRIVE HOSTVGDRIVESPACE
+ while true; do
+ HOSTVGDRIVE=$(get_dev_name) || return 0
+ get_drive_size $HOSTVGDRIVE HOSTVGDRIVESPACE
+ if [ $OVIRT_SHARED_ROOT == "y" ]; then
+ if [ $ROOTDRIVE == $HOSTVGDRIVE ]; then
+ printf "\n\nRoot Drive and HostVG drive must be different when shared\n\n"
+ return 1
+ else
+ break;
+ fi
+ fi
+ break;
+ done
echo $HOSTVGDRIVESPACE
fi
printf "\n\nPlease configure storage partitions.\n\n"
--
1.6.6
More information about the ovirt-devel
mailing list