Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 893b4547bb5f5eb61d2f3af4281e5a38 > files > 98

cman-2.0.115-96.el5_8.1.src.rpm

From 48f5feec3bbd0375dff3024ce4deca7090608325 Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac@redhat.com>
Date: Mon, 4 Apr 2011 15:11:59 +0200
Subject: [PATCH 2/4] fence_ipmilan: returns incorrect status on monitor op if chassis is powered off

There is a bug in fence_ipmilan agent: it exits with result code 2 on
"monitor"/"status" command if chassis is powered off. Instead it should return
0 because "monitor" command should return fence device status, not chassis
status.

Reported and patch proposed by Vladislav Bogdanov

Resolves: rhbz#693427
---
 fence/agents/ipmilan/ipmilan.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c
index 4371143..7031982 100644
--- a/fence/agents/ipmilan/ipmilan.c
+++ b/fence/agents/ipmilan/ipmilan.c
@@ -1445,6 +1445,10 @@ metaout:
 	  else
 	    printf("Failed\n");
 	}
+	
+	if (!strcasecmp(op, "monitor"))
+          translated_ret = ret;
+
 	return translated_ret;
 }
 #endif /* fence */
-- 
1.7.4