APC PDUs with firmware 6.x have a different OID space for turning
ports on and off, to the one for querying.  The old namespace still
works to turn the port on and off but returns a genErr error response!

Support a new command-line option --apc6 to use this other OID.

Information about OIDs etc. obtained here:
  
https://git.fedorahosted.org/cgit/fence-agents.git/commit/?id=55ccdd79f530092af06eea5b4ce6a24bd82c0875

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 pdu-msw |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/pdu-msw b/pdu-msw
index fc4d314..6c25690 100755
--- a/pdu-msw
+++ b/pdu-msw
@@ -30,6 +30,15 @@ my $community= 'private';
 my $baseoid= '.1.3.6.1.4.1.318.1.1.4.4.2.1';
 my $baseoid_write= "$baseoid.3";
 
+while (@ARGV && $ARGV[0] =~ m/^-/) {
+    $_ = shift @ARGV;
+    if (m/^--apc6$/) {
+       $baseoid_write= '.1.3.6.1.4.1.318.1.1.12.3.3.1.1.4';
+    } else {
+       die "$_ ?";
+    }
+}
+
 if (@ARGV<2 || @ARGV>3 || $ARGV[0] =~ m/^-/) { die "bad usage\n$usagemsg"; }
 
 our ($dnsname,$outlet,$action) = @ARGV;
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to