Commit be25e6f8 authored by Mike Hibler's avatar Mike Hibler

Minor changes to support IPMI interfaces.

parent 07f0d3c9
......@@ -40,7 +40,7 @@ sub usage()
print STDERR " [-s <switchinfo>] <node_id> mac IP arg1 arg2\n";
print STDERR " management_iface -r <node_id>\n";
print STDERR " -h This message\n";
print STDERR " -t type Management type; ilo, ilo2, ilo3, drac\n";
print STDERR " -t type Management type; ilo, ilo2, ilo3, drac, ipmi15, ipmi20\n";
print STDERR " -s info Optional switch info; switch,card,port\n";
print STDERR " -s - Search output of switchmac to find switch info\n";
print STDERR " -a pswd Password auth; provide login and password.\n";
......@@ -113,8 +113,7 @@ if (defined($options{'s'})) {
if (defined($options{'t'})) {
$type = $options{'t'};
usage()
if (! ($type eq "ilo" || $type eq "ilo2" || $type eq "ilo3" ||
$type eq "drac"));
if ($type !~ /^(ilo|ilo2|ilo3|drac|ipmi15|ipmi20)$/);
}
if (defined($options{'a'})) {
$authtype = $options{'a'};
......@@ -208,12 +207,15 @@ if (defined($switchinfo)) {
}
}
my $isipmi = ($type =~ /^ipmi/ ? 1 : 0);
#
# Add the outlet and authinfo.
#
$node->AddOutlet($type, 0,
{"key_type" => $type,
"key_role" => ($authtype eq "key" ? "ssh-key" : "ssh-passwd"),
"key_role" => ($authtype eq "key" ? "ssh-key" :
($isipmi ? "ipmi-passwd" : "ssh-passwd")),
"key_uid" => $ARGV[0],
"key" => $ARGV[1]}) == 0
or fatal("Could not add outlet records");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment