Blame SOURCES/bz1021392-fencing_default_action_off.patch

182b9e
From 8b127ebff6a38b0c6dd9c2a1ad738e2d7637e0fa Mon Sep 17 00:00:00 2001
182b9e
From: Marek 'marx' Grac <mgrac@redhat.com>
182b9e
Date: Wed, 22 Jan 2014 13:51:50 +0100
182b9e
Subject: [PATCH 1/3] fencing: Fabric fence agents should have default action
182b9e
 "off"
182b9e
182b9e
Previously, when you have run fence agent without -o XYZ, reboot was performed. Fabric fence agents do not have them
182b9e
so fence agent fails. This update does not fix only this issue but also text --help and in manual pages.
182b9e
182b9e
Resolves: rhbz#1021392
182b9e
---
182b9e
 fence/agents/lib/fencing.py.py |    4 ++++
182b9e
 1 files changed, 4 insertions(+), 0 deletions(-)
182b9e
182b9e
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
182b9e
index 9cc7407..889bb04 100644
182b9e
--- a/fence/agents/lib/fencing.py.py
182b9e
+++ b/fence/agents/lib/fencing.py.py
182b9e
@@ -618,6 +618,10 @@ def check_input(device_opt, opt):
182b9e
 	else:
182b9e
 		all_opt["login"]["required"] = "0"
182b9e
 
182b9e
+	if device_opt.count("fabric_fencing"):
182b9e
+		all_opt["action"]["default"] = "off"
182b9e
+		all_opt["action"]["help"] = "-o, --action=[action]          Action: status, off (default) or on"
182b9e
+
182b9e
 	## Set default values
182b9e
 	#####
182b9e
 	for opt in device_opt:
182b9e
-- 
182b9e
1.7.7.6
182b9e