[PATCH] sanlock: add missing test command in virt-sanlock-cleanup.in

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

 



RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=949483

Signed-off-by: Alex Jia <ajia@xxxxxxxxxx>
---
In fact, the virt-sanlock-cleanup works well on RHEL6.4, but doesn't work
on RHEL7.0, and got a error "line 14: x: command not found", It may be 
different bash version issue.

 tools/virt-sanlock-cleanup.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/virt-sanlock-cleanup.in b/tools/virt-sanlock-cleanup.in
index a9b7c2e..5389fc7 100644
--- a/tools/virt-sanlock-cleanup.in
+++ b/tools/virt-sanlock-cleanup.in
@@ -11,7 +11,7 @@ fi
 LOCKSPACE="__LIBVIRT__DISKS__"
 
 LOCKDIR=`augtool print '/files@sysconfdir@/libvirt/qemu-sanlock.conf/disk_lease_dir'`
-if test $? != 0 || "x$LOCKDIR" = "x" ; then
+if test $? != 0 || test "x$LOCKDIR" = "x" ; then
   LOCKDIR="@localstatedir@/lib/libvirt/sanlock"
 fi
 
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]