-Fix problem where snmp destinations could not be set once the SNMP was up and running on AMM

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2634 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2009-01-21 20:52:09 +00:00
parent 86124e90bd
commit 2e4ad2d442

View File

@ -531,8 +531,17 @@ sub mpaconfig {
}
my $dstindex = $1;
if ($assignment) {
my $restorev1agent = 0;
if (($session->get(['1.3.6.1.4.1.2.3.51.2.4.9.3.1.5',0])) == 1) { #per the BLADE MIB, this *must* be zero in order to change SNMP IPs
$restorev1agent=1;
setoid('1.3.6.1.4.1.2.3.51.2.4.9.3.1.5',0,0,'INTEGER');
}
setoid("1.3.6.1.4.1.2.3.51.2.4.9.3.1.4.1.1.".(2+$dstindex).".1",1,$value,'OCTET');
setoid("1.3.6.1.4.1.2.3.51.2.4.9.3.1.4.1.1.6.1",1,1,'INTEGER'); #access type: read-traps, don't give full write access to the community
if (restorev1agent) { #If we had to transiently disable the v1 agent, put it back the way it was
setoid('1.3.6.1.4.1.2.3.51.2.4.9.3.1.5',0,1,'INTEGER');
}
}
my $data = $session->get(["1.3.6.1.4.1.2.3.51.2.4.9.3.1.4.1.1.".(2+$dstindex).".1.1"]);
push @cfgtext,"SP SNMP Destination $1: $data";