Address Sourceforge bug 1914498
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@795 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
0320905523
commit
0cc9b4d7f8
@ -785,11 +785,11 @@ sub power {
|
||||
if ($subcommand eq "on" or ($subcommand eq "boot" and $stat eq "off")) {
|
||||
$data = $session->set(new SNMP::Varbind([".".$powerchangeoid,$slot,1,'INTEGER']));
|
||||
unless ($data) { return (1,$session->{ErrorStr}); }
|
||||
$stat = ($data ? "on" : "off");
|
||||
$stat .= " " . ($data ? "on" : "off");
|
||||
} elsif ($subcommand eq "reset" or ($subcommand eq "boot" and $stat eq "on")) {
|
||||
$data = $session->set(new SNMP::Varbind([".".$powerresetoid,$slot ,1,'INTEGER']));
|
||||
unless ($data) { return (1,$session->{ErrorStr}); }
|
||||
$stat = "reset";
|
||||
$stat = "on reset";
|
||||
}
|
||||
if ($session->{ErrorStr}) { return (1,$session->{ErrorStr}); }
|
||||
if ($stat) { return (0,$stat); }
|
||||
|
Loading…
Reference in New Issue
Block a user