From 60bab458b9de0f24df07e72cb70a7aae542964c7 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 30 Oct 2007 13:25:11 +0000 Subject: [PATCH] Add boot parameter to rpower for blade git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@20 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/usr/lib/xcat/plugins/blade.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/blade.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/blade.pm index 50d0d16f6..2baeafb21 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/blade.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/blade.pm @@ -452,7 +452,7 @@ sub power { my $subcommand = shift; my $data; my $stat; - if ($subcommand eq "stat") { + if ($subcommand eq "stat" or $subcommand eq "boot") { $data = $session->get([$powerstatoid.".".$slot]); if ($data == 1) { $stat = "on"; @@ -465,11 +465,12 @@ sub power { $data = $session->set(new SNMP::Varbind([".".$powerchangeoid,$slot,0,'INTEGER'])); unless ($data) { return (1,$session->{ErrorStr}); } $stat = "off"; - } elsif ($subcommand eq "on") { + } + 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"); - } elsif ($subcommand eq "reset") { + } 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";