Blame SOURCES/bz1214522-4-port_as_ip.patch

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