From 9705c72e27c61a2102321009d4f26cd06151520b Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 12 Mar 2008 20:46:17 +0000 Subject: [PATCH] Add community setting support to IPMI spconfig command git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@771 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/ipmi.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm b/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm index 9ad83cc1d..f6582e336 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm @@ -807,6 +807,17 @@ sub setnetinfo { @cmd = (0x01,$channel_number,0x0b,$halfsec); } + elsif($subcommand =~ m/community/ ) { + my $cindex = 0; + my @clist; + foreach (0..17) { + push @clist,0; + } + foreach (split //,$argument) { + $clist[$cindex++]=ord($_); + } + @cmd = (1,$channel_number,0x10,@clist); + } elsif($subcommand =~ m/snmpdest(\d+)/ ) { my $dstip = $argument; #pop(@input); my @dip = split /\./, $dstip; @@ -839,7 +850,7 @@ sub setnetinfo { $text = $error; } else { - if($subcommand eq "garp" or $subcommand =~ m/snmpdest\d+/ or $subcommand eq "alert") { + if($subcommand eq "garp" or $subcommand =~ m/snmpdest\d+/ or $subcommand eq "alert" or $subcommand =~ /community/) { $code = $returnd[36]; if($code == 0x00) {