From 3bd5b37773d4528ce2dd882fb0505f7d4dd310e6 Mon Sep 17 00:00:00 2001 From: immarvin Date: Wed, 10 May 2017 06:03:34 -0400 Subject: [PATCH] check existence of netboot config file in postage.pm --- xCAT-server/lib/perl/xCAT/Postage.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 9952169d5..16ee4a23c 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -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"; + } } }