mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-09-06 10:18:20 +00:00
Workaround different IPv6 syntax for asu/onecli
This commit is contained in:
@@ -23,9 +23,13 @@ use Getopt::Long;
|
||||
use POSIX qw(:signal_h :errno_h :sys_wait_h);
|
||||
use Thread qw(yield);
|
||||
|
||||
|
||||
$::onecli = 0;
|
||||
if ($iam =~ /pasu/) {
|
||||
$::utilcmd = '/opt/lenovo/onecli/asu';
|
||||
$::onecli = 1;
|
||||
if (!-x $::utilcmd) {
|
||||
$::onecli = 0;
|
||||
$::utilcmd = '/opt/lenovo/toolscenter/asu/asu64';
|
||||
}
|
||||
if (!-x $::utilcmd) {
|
||||
@@ -240,6 +244,9 @@ sub utilnode {
|
||||
} else {
|
||||
foreach my $a (@_) { $args .= ' ' . xCAT::Utils->quote($a); }
|
||||
}
|
||||
if ($::onecli and $bmc =~ /:/) {
|
||||
$bmc = "[$bmc]";
|
||||
}
|
||||
my $cmd = "$::utilcmd $args --host '$bmc' --user '$username' --password '$passwd' 2>&1 |";
|
||||
if ($::VERBOSE) { print "forking $cmd\n"; }
|
||||
my $pid = open($$out, $cmd);
|
||||
|
Reference in New Issue
Block a user