]> xenbits.xensource.com Git - libvirt.git/commitdiff
sanlock: add missing test command in virt-sanlock-cleanup.in
authorAlex Jia <ajia@redhat.com>
Thu, 15 Sep 2011 06:13:28 +0000 (14:13 +0800)
committerEric Blake <eblake@redhat.com>
Thu, 15 Sep 2011 15:44:48 +0000 (09:44 -0600)
* tools/virt-sanlock-cleanup.in: fix missing test command when judging
  second condition.

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

Signed-off-by: Alex Jia <ajia@redhat.com>
tools/virt-sanlock-cleanup.in

index d8a40a59b124cd12c53295da93625417fa5412df..72cd5e012d86dbf85a3fed9bfa5fced10a640c82 100644 (file)
@@ -29,7 +29,7 @@ cd "$LOCKDIR" || exit 1
 
 for MD5 in *
 do
-  if test $MD5 != '*' && $MD5 != $LOCKSPACE ; then
+  if test $MD5 != '*' && test $MD5 != $LOCKSPACE ; then
     RESOURCE="$LOCKSPACE:$MD5:$LOCKDIR/$MD5:0"
     notify -n "Cleanup: $RESOURCE "
     sanlock client command -r $RESOURCE -c /bin/rm -f "$LOCKDIR/$MD5" 2>/dev/null