Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core

This commit is contained in:
xq2005 2013-08-21 03:07:34 -07:00
commit 9e2bb00b82
4 changed files with 27 additions and 20 deletions

View File

@ -611,19 +611,7 @@ sub noderange {
%nodes = map { $_ => 1 } noderange($start,$verify,$exsitenode,%options);
my %innernodes = map { $_ => 1 } noderange($middle,$verify,$exsitenode,%options);
set_arith(\%nodes,$op,\%innernodes);
$op=",";
if ($end =~ m/^,-/) {
$op = ",-";
$end =~ s/^,-//;
} elsif ($end =~ m/^@/) {
$op = "@";
$end =~ s/^@//;
} else {
$end =~ s/^,//;
}
my %endnodes = map { $_ => 1 } noderange($end,$verify,$exsitenode,%options);
set_arith(\%nodes,$op,\%endnodes);
return sort(keys %nodes)
$range = $end;
}
my $op = ",";
@ -632,7 +620,8 @@ sub noderange {
@elems = split(/(@(?![^\(]*?\)))/,$range); # only split on @ when no , are present (inner recursion)
}
while (my $atom = shift @elems) {
while (defined(my $atom = shift @elems)) {
if ($atom eq '') { next; }
if ($atom eq ',') {
next;
}

View File

@ -355,7 +355,7 @@ sub getSNList
$servicenodetab->close;
foreach my $node (@nodes)
{
if ($service eq "") # want all the service nodes
if (! defined ($service) || ($service eq "")) # want all the service nodes
{
push @servicenodes, $node->{node};
}

View File

@ -54,6 +54,11 @@ if [ "$IPMIMFG" == 2 ]; then #IBM
for p in $BMCPORT; do
ipmitool -d $idev raw 0xc 1 1 0xc0 $p > /dev/null
ipmitool -d $idev raw 0x04 0x12 0x09 0x01 0x18 0x${p}1 0x00 > /dev/null
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
while [ "$CURBMCPORT" -ne "$BMCPORT" ]; do
sleep 1
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
done
let idev=idev+1
done
fi
@ -67,7 +72,12 @@ if [ "$IPMIMFG" == 2 ]; then #IBM
let idev=0
for p in $BMCPORT; do
ipmitool -d $idev raw 0xc 1 1 0xc0 $p > /dev/null
let idev=idev+1
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
while [ "$CURBMCPORT" -ne "$BMCPORT" ]; do
sleep 1
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
done
let idev=idev+1
done
fi
fi
@ -84,8 +94,17 @@ elif [ "$IPMIMFG" == 20301 ] ; then
let idev=0
for p in $BMCPORT; do
ipmitool -d $idev raw 0xc 1 1 0xc0 $p > /dev/null
NEWPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0|awk '{print $2}'`
sleep 10
# after this change, we need to watch and wait to see that it
# actually takes effect. On port change, the service processor
# does not migrate the network configuration over
# so we might be halfway through setting up when the net config
# reverts to dhcp then static, which setting a static ip for is
# considered invalid
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
while [ -z "$CURBMCPORT" -o 0"$CURBMCPORT" -ne "$BMCPORT" ]; do
sleep 1
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
done
let idev=idev+1
done

View File

@ -2427,7 +2427,6 @@ sub rmkitcomp
my %rsp;
push@{ $rsp{data} }, "kitcomponent $kitcompdep basename does not exist";
xCAT::MsgUtils->message( "E", \%rsp, $callback );
return 1;
}
my $kitcompdepname = get_highest_version('kitcompname', 'version', 'release', @entries);
@ -2486,7 +2485,7 @@ sub rmkitcomp
foreach my $kitcomponent (keys %kitcomps) {
my @kitcompscripts = split( ',', $kitcomps{$kitcomponent}{postbootscripts} );
foreach my $kitcompscript ( @kitcompscripts ) {
if ( $osimagescript =~ /^$kitcompscript$/ ) {
if ( $osimagescript =~ /^$kitcompscript/ ) {
$match = 1;
last;
}