Blob Blame History Raw
From fe88d1834032776638fc41c9fc96123923e1432a Mon Sep 17 00:00:00 2001
From: Douglas Schilling Landgraf <dougsland@redhat.com>
Date: Mon, 9 Jul 2012 10:49:24 -0400
Subject: [PATCH 30/40] ovirt_functions: fix elif statement

Identify correctly the ovirt Node and fix the error message from vdsm-reg logs:

[: /etc/ovirt-node-image-release: binary operator expected

Change-Id: I4eae7e64361d148d60c50dbacd273de7a2490be2
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/6072
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
---
 vdsm/ovirt_functions.sh |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/vdsm/ovirt_functions.sh b/vdsm/ovirt_functions.sh
index 84cf686..b1e3ef2 100644
--- a/vdsm/ovirt_functions.sh
+++ b/vdsm/ovirt_functions.sh
@@ -9,10 +9,12 @@
 #
 
 function isOvirt() {
+    for f in /etc/ovirt-node-*-release; do
+        [ -f "$f" ] && return 0
+    done
+
     if [ -f /etc/rhev-hypervisor-release ]; then
         return 0
-    elif [ -f /etc/ovirt-node-*-release ]; then
-        return 0
     else
         return 1
     fi
-- 
1.7.7.6