[Ovirt-devel] [PATCH node] Removes a confusing storage message.

Darryl L. Pierce dpierce at redhat.com
Mon Jan 19 21:43:31 UTC 2009


If interactively configuring storage, the user is shown this message
when configuration the data partition:

Change data partition size. (Current -1 MB, Minimum 5 MB)

This is confusing to read, and is misleading since the data partition
size can be 0, indicating the user does not want a data partition.

So the minimum size is set to 0. When the prompt is show, only those
partitions that have a non-zero minimum size are displayed with such a
message.

Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
 scripts/ovirt-config-storage |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index efe55f5..e85f040 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -26,7 +26,7 @@ boot_min_size=50
 root_min_size=256
 config_min_size=5
 logging_min_size=5
-data_min_size=5
+data_min_size=0
 swap_min_size=5
 
 get_selected_drive_size()
@@ -158,7 +158,9 @@ do_configure()
         eval "size=\$$size_var"
         min_size_var=${i}_min_size
         eval "min_size=\$$min_size_var"
-        read -ep "Change $i partition size. (Current $size MB, Minimum $min_size MB)? "
+	min_msg=""
+	if [ $min_size != 0 ]; then min_msg=", Minimum $min_size MB"; fi
+        read -ep "Change $i partition size. (Current $size MB$min_msg)? "
         r=$REPLY
         test -z "$r" && r=$size
         if [[ $r =~ ^-*[0-9]+$ ]] && [[ $r -ge $min_size ||
-- 
1.6.0.6




More information about the ovirt-devel mailing list