2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-14 02:10:23 +00:00

Merge pull request from immarvin/onpostage

check existence of netboot config file in postage.pm
This commit is contained in:
Yuan Bai
2017-05-11 10:20:02 +08:00
committed by GitHub

@ -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";
}
}
}