2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Merge pull request #2341 from immarvin/ongrub

fix [FVT]set xcatdebugmode=1 does not work after xcatdebugmode is set to 2 #2337
This commit is contained in:
Weihua Hu 2016-12-22 12:36:20 +08:00 committed by GitHub
commit aeda6e9021

View File

@ -185,8 +185,8 @@ sub setstate {
my $cref = $chainhash{$node}->[0]; #$chaintab->getNodeAttribs($node,['currstate']);
# remove the old boot configuration file and create a new one, but only if not offline directive
unlink($tftpdir . "/boot/grub2/" . $node);
# remove the old boot configuration files and create a new one, but only if not offline directive
system("find . -inum \$(stat --printf \%i $tftpdir/boot/grub2/$node 2>/dev/null) -exec rm -f {} \\; 2>/dev/null");
if ($cref and $cref->{currstate} ne "offline") {
open($pcfg, '>', $tftpdir . "/boot/grub2/" . $node);
print $pcfg "#" . $cref->{currstate} . "\n";
@ -334,7 +334,6 @@ sub setstate {
}
if (! $nodemac and $macstring) {
$nodemac = xCAT::Utils->parseMacTabEntry($macstring, $node);
}