[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Ovirt-devel] [PATCH node] Fixes some small issues with the ovirt-config-storage script.



Wraps the vgremove call in a conditional that checks that any volume
groups exist first.

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

diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index e2ddec1..369989c 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -157,7 +157,7 @@ perform_partitioning()
     LOG=/var/log/ovirt-partition.log
     {
     vgroups=$(vgdisplay -C | awk '{ print $1" "; }')
-    vgremove -f $vgroups
+    if [ -n "$vgroups" ]; then vgremove -f $vgroups; fi
 
     # Exit upon any failure.
     set -e
-- 
1.6.0.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]