From 598b712fba6158e121413525767112bf90ee87ac Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 28 Feb 2008 17:02:46 +0000 Subject: [PATCH] -Make rpower reset work on mm (mp.mpa is itself, mp.id is 0, reventlog works to get non-node events if you do this too) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@617 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/blade.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/blade.pm b/xCAT-server-2.0/lib/xcat/plugins/blade.pm index 86ca4e6d7..1de12686f 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/blade.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/blade.pm @@ -737,6 +737,15 @@ sub power { my $subcommand = shift; my $data; my $stat; + unless ($slot > 0) { + if ($subcommand eq "reset" or $subcommand eq "boot") { + $data = $session->set(new SNMP::Varbind([".1.3.6.1.4.1.2.3.51.2.7.4",0,1,'INTEGER'])); + unless ($data) { return (1,$session->{ErrorStr}); } + return (0,"reset"); + } else { + return (1,"$subcommand unsupported on the management module"); + } + } if ($subcommand eq "stat" or $subcommand eq "boot") { $data = $session->get([$powerstatoid.".".$slot]); if ($data == 1) {