fix for bug 2833494
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3964 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
263bf07852
commit
1450616157
@ -2264,6 +2264,52 @@ sub defls
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
# need a special case for the node postscripts attribute,
|
||||
# The 'xcatdefaults' postscript should be added to the postscript attribute
|
||||
my $getnodes = 0;
|
||||
foreach my $objtype (@::clobjtypes)
|
||||
{
|
||||
if ($objtype eq 'node')
|
||||
{
|
||||
$getnodes = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ($getnodes)
|
||||
{
|
||||
my $xcatdefaultsps;
|
||||
my @TableRowArray = xCAT::DBobjUtils->getDBtable('postscripts');
|
||||
if (defined(@TableRowArray))
|
||||
{
|
||||
foreach my $tablerow (@TableRowArray)
|
||||
{
|
||||
if(($tablerow->{node} eq 'xcatdefaults') && !($tablerow->{disable}))
|
||||
{
|
||||
$xcatdefaultsps = $tablerow->{postscripts};
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach my $obj (keys %myhash)
|
||||
{
|
||||
if ($myhash{$obj}{objtype} eq 'node')
|
||||
{
|
||||
if($xcatdefaultsps)
|
||||
{
|
||||
if ($myhash{$obj}{postscripts})
|
||||
{
|
||||
$myhash{$obj}{postscripts} = $xcatdefaultsps . ',' . $myhash{$obj}{postscripts};
|
||||
}
|
||||
else
|
||||
{
|
||||
$myhash{$obj}{postscripts} = $xcatdefaultsps;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# the list of objects may be limited by the "-w" option
|
||||
# see which objects have attr/val that match the where values
|
||||
# - if provided
|
||||
|
Loading…
Reference in New Issue
Block a user