fixed bug 3605

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16662 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua 2013-06-18 09:07:02 +00:00
parent 8fac597977
commit 0244b031cf

View File

@ -348,6 +348,7 @@ sub makescript {
my $nodetype = getNodeType($node);
#print Dumper($noderesent);
#print Dumper($routes);
#routes
my $route_vars;
if ($noderesent and defined($noderesent->{'routenames'}))
@ -355,20 +356,21 @@ sub makescript {
my $rn=$noderesent->{'routenames'};
my @rn_a=split(',', $rn);
if ((@rn_a > 0) && defined($routes) ) {
$route_vars .= "NODEROUTENAMES=$rn\n";
$route_vars .= "export NODEROUTENAMES\n";
#$route_vars .= "NODEROUTENAMES=$rn\n";
#$route_vars .= "export NODEROUTENAMES\n";
foreach my $route_name (@rn_a) {
if ($routes and defined($routes->{net}) and defined($routes->{mask})) {
my $val="ROUTE_$route_name=" . $routes->{net} . "," . $routes->{mask};
my $rt = $routes->{$route_name};
if ($rt and defined($rt->{net}) and defined($rt->{mask})) {
my $val="ROUTE_$route_name='" . $rt->{net} . "," . $rt->{mask};
$val .= ",";
if (defined($routes->{gateway})) {
$val .= $routes->{gateway};
if (defined($rt->{gateway})) {
$val .= $rt->{gateway};
}
$val .= ",";
if (defined($routes->{ifname})) {
$val .= $routes->{ifname};
if (defined($rt->{ifname})) {
$val .= $rt->{ifname};
}
$route_vars .= "$val\n";
$route_vars .= "$val'\n";
$route_vars .= "export ROUTE_$route_name\n";
}
}