mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-21 19:22:05 +00:00
More fixes due to review comments
This commit is contained in:
parent
05f2832e7d
commit
97a159d47a
@ -724,16 +724,16 @@ sub process_request {
|
||||
}
|
||||
}
|
||||
|
||||
my @makedhcp_nodes;
|
||||
if ($args[0] eq 'offline') {
|
||||
my @rmdhcp_nodes;
|
||||
# If nodeset directive was offline we need to remove the architecture file link and remove dhcp entries
|
||||
foreach my $osimage (keys %osimagenodehash) {
|
||||
foreach my $tmp_node (@{ $osimagenodehash{$osimage} }) {
|
||||
unlink( "$tftpdir/boot/grub2/grub2-$tmp_node");
|
||||
push(@makedhcp_nodes, $tmp_node);
|
||||
push(@rmdhcp_nodes, $tmp_node);
|
||||
}
|
||||
}
|
||||
$sub_req->({ command => ['makedhcp'],arg=>['-d'], node => \@makedhcp_nodes }, $callback);
|
||||
$sub_req->({ command => ['makedhcp'],arg=>['-d'], node => \@rmdhcp_nodes }, $callback);
|
||||
}
|
||||
|
||||
#now run the end part of the prescripts
|
||||
|
@ -532,7 +532,6 @@ sub process_request {
|
||||
my $linuximgtab=xCAT::Table->new('linuximage',-create=>1);
|
||||
|
||||
my %machash = %{$mactab->getNodesAttribs(\@nodes,[qw(mac)])};
|
||||
my @makedhcp_nodes;
|
||||
foreach (@nodes) {
|
||||
my $tftpdir;
|
||||
if ($nrhash{$_}->[0] and $nrhash{$_}->[0]->{tftpdir}) {
|
||||
@ -567,13 +566,12 @@ sub process_request {
|
||||
unlink($tftpdir."/xcat/xnba/nodes/".$_.".pxelinux");
|
||||
unlink($tftpdir."/xcat/xnba/nodes/".$_.".uefi");
|
||||
unlink($tftpdir."/xcat/xnba/nodes/".$_.".elilo");
|
||||
push(@makedhcp_nodes, $_);
|
||||
}
|
||||
}
|
||||
}
|
||||
# for offline operation, remove the dhcp entries
|
||||
if ($args[0] eq 'offline') {
|
||||
$sub_req->({ command => ['makedhcp'],arg=>['-d'],node => \@makedhcp_nodes }, $::XNBA_callback);
|
||||
$sub_req->({ command => ['makedhcp'],arg=>['-d'],node => \@nodes }, $::XNBA_callback);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user