2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

check existence of netboot config file in postage.pm

This commit is contained in:
immarvin 2017-05-10 06:03:34 -04:00
parent 1e098afcb2
commit 3bd5b37773

View File

@ -1986,12 +1986,16 @@ sub getPostScripts
{
$nodecfg = "$tftpdir/pxelinux.cfg/$node";
} elsif($netboot eq "petitboot"){
$nodecfg = "$tftpdir/petitboot/$node";
}
my $rc = system("grep net.ifnames=0 $nodecfg >/dev/null 2>&1");
if ($rc == 0)
{
$result .= "disableconsistentNICrename\n";
if( -f "$nodecfg"){
my $rc = system("grep net.ifnames=0 $nodecfg >/dev/null 2>&1");
if ($rc == 0)
{
$result .= "disableconsistentNICrename\n";
}
}
}