Change in vdsm[master]: Packaging: libvirt configuration detection should skip /dev/...

zhshzhou at linux.vnet.ibm.com zhshzhou at linux.vnet.ibm.com
Thu Oct 17 09:54:48 UTC 2013


Zhou Zheng Sheng has uploaded a new change for review.

Change subject: Packaging: libvirt configuration detection should skip /dev/null
......................................................................

Packaging: libvirt configuration detection should skip /dev/null

We disabled libvirt-sanlock in Ubuntu, so QLCONF is set to /dev/null,
and later we need to grep "${BY_VDSM_VERS}" from QLCONF to confirm
libvirt is configured. grep returns 1 for /dev/null but actually libvirt
is configured. This patch skip /dev/null when grep libvirt .conf files.

Change-Id: Ia0d8a976c023709068ca2f3691fab5cd59ae02ff
Signed-off-by: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
---
M lib/vdsm/tool/libvirt_configure.sh.in
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/20260/1

diff --git a/lib/vdsm/tool/libvirt_configure.sh.in b/lib/vdsm/tool/libvirt_configure.sh.in
index ed8a466..f9ac757 100755
--- a/lib/vdsm/tool/libvirt_configure.sh.in
+++ b/lib/vdsm/tool/libvirt_configure.sh.in
@@ -152,6 +152,10 @@
 is_already_configured() {
     local rc=0
     while [ -n "$1" ]; do
+        if [ "$1" = "/dev/null" ];then
+            shift
+            continue
+        fi
         if ! /bin/grep -q "${BY_VDSM_VERS}" "$1" >/dev/null 2>&1; then
             rc=1
             echo "libvirt is not configured for vdsm yet"


-- 
To view, visit http://gerrit.ovirt.org/20260
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0d8a976c023709068ca2f3691fab5cd59ae02ff
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list