Blame SOURCES/bz1214522-4-port_as_ip.patch

44709c
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
44709c
index 3a6e2ab..bb8e3a4 100644
44709c
--- a/fence/agents/lib/fencing.py.py
44709c
+++ b/fence/agents/lib/fencing.py.py
44709c
@@ -657,6 +657,10 @@ def process_input(avail_opt):
44709c
 		opt = z
44709c
 		##
44709c
 		#####
44709c
+
44709c
+		# This test should NOT be used for stdin input where it should be allowed (and ignored)
44709c
+		if "port_as_ip" in device_opt and not "--port-as-ip" in options and "--plug" in options:
44709c
+			fail_usage("Parser error: option -n/--plug is not recognized")
44709c
 	else:
44709c
 		opt = {}
44709c
 		name = ""
44709c
@@ -788,10 +792,6 @@ def check_input(device_opt, opt):
44709c
 		options["--action"] = "off"
44709c
 
44709c
 	## automatic detection and set of valid UUID from --plug
44709c
-
44709c
-	if "port_as_ip" in device_opt and not "--port-as-ip" in options and "--plug" in options:
44709c
-		fail_usage("Parser error: option -n/--plug is not recognized")
44709c
-
44709c
 	if not options.has_key("--username") and \
44709c
 			device_opt.count("login") and (device_opt.count("no_login") == 0):
44709c
 		fail_usage("Failed: You have to set login name")