From 4a1247fbe95e8bb2ceaa111efaf58eb299703d81 Mon Sep 17 00:00:00 2001 From: immarvin Date: Wed, 21 Dec 2016 03:36:22 -0500 Subject: [PATCH] fix [FVT]set xcatdebugmode=1 does not work after xcatdebugmode is set to 2 #2337; use symbol links instead of hard link while creating grub.cfg.xxxx --- xCAT-server/lib/xcat/plugins/grub2.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/grub2.pm b/xCAT-server/lib/xcat/plugins/grub2.pm index 34ddd9d8a..1d4abda32 100644 --- a/xCAT-server/lib/xcat/plugins/grub2.pm +++ b/xCAT-server/lib/xcat/plugins/grub2.pm @@ -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); }