Blame SOURCES/bz1465436-fence_ipmilan-fix-default-method-inconsistency.patch

035a21
From 1a6d06adad10e2f3733433617fb0c80409551055 Mon Sep 17 00:00:00 2001
035a21
From: Marek 'marx' Grac <mgrac@redhat.com>
035a21
Date: Mon, 3 Jul 2017 10:29:24 +0200
035a21
Subject: [PATCH] fence_ipmilan: Fix inconsistency between help and manual page
035a21
 (defalt for --method)
035a21
035a21
---
035a21
 fence/agents/ipmilan/fence_ipmilan.py | 3 ++-
035a21
 1 file changed, 2 insertions(+), 1 deletion(-)
035a21
035a21
diff --git a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py
035a21
index 3f334713..6c43b185 100644
035a21
--- a/fence/agents/ipmilan/fence_ipmilan.py
035a21
+++ b/fence/agents/ipmilan/fence_ipmilan.py
035a21
@@ -178,7 +178,8 @@ def main():
035a21
 		all_opt["lanplus"]["default"] = "1"
035a21
 
035a21
 	all_opt["ipport"]["default"] = "623"
035a21
-	all_opt["method"]["help"] = "-m, --method=[method]          Method to fence (onoff|cycle) (Default: cycle)\n" \
035a21
+	if all_opt["method"]["default"] == "cycle":
035a21
+		all_opt["method"]["help"] = "-m, --method=[method]          Method to fence (onoff|cycle) (Default: cycle)\n" \
035a21
 				    "WARNING! This fence agent might report success before the node is powered off. " \
035a21
 				    "You should use -m/method onoff if your fence device works correctly with that option."
035a21