From 960b39695fab477e5b63b6aa16aa4d86d717233a Mon Sep 17 00:00:00 2001 From: Marek 'marx' Grac <mgrac@redhat.com> Date: Fri, 30 Jul 2010 17:58:01 +0200 Subject: [PATCH] fence_drac5: make "port" a synonym of "module_name" for drac5 Resolves: rhbz#619776 --- fence/agents/lib/fencing.py.py | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index e44632b..fd828a3 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -517,6 +517,11 @@ def process_input(avail_opt): else: longopt_list.append(all_opt[k]["longopt"]) + ## Compatibility layer + if avail_opt.count("module_name") == 1: + getopt_string += "n:" + longopt_list.append("plug=") + ## ## Read options from command line or standard input ##### @@ -543,6 +548,8 @@ def process_input(avail_opt): z = dict(opt) if z.has_key("-T") == 1: z["-o"] = "status" + if z.has_key("-n") == 1: + z["-m"] = z["-n"] opt = z ## @@ -572,6 +579,8 @@ def process_input(avail_opt): name = "module_name" elif name == "action" and 1 == avail_opt.count("io_fencing"): name = "io_fencing" + elif name == "port" and 1 == avail_opt.count("drac_version"): + name = "module_name" ## ###### -- 1.6.0.6