From 4f0a510668627b855dcedfd38a5c8a59d97c8d3b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 2 Oct 2020 08:31:48 -0400 Subject: [PATCH] Do not error on missing pxelinux.0 It is not always needed anymore, in fact it is rarely used. --- xCAT-server/lib/xcat/plugins/xnba.pm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index 6080f3093..f5b60ce1a 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -732,16 +732,11 @@ sub process_request { #back to normal business if (!-r "$globaltftpdir/xcat/pxelinux.0") { - unless (-r $::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0") { - $::XNBA_callback->({ error => [ "Unable to find pxelinux.0 at " . $::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0" ], errorcode => [1] }); - return; + if (-r $::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0") { + copy($::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0", "$globaltftpdir/xcat/pxelinux.0"); + chmod(0644, "$globaltftpdir/xcat/pxelinux.0"); + # $::XNBA_callback->({ error => [ "Unable to find pxelinux.0 at " . $::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0" ], errorcode => [1] }); } - copy($::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0", "$globaltftpdir/xcat/pxelinux.0"); - chmod(0644, "$globaltftpdir/xcat/pxelinux.0"); - } - unless (-r "$globaltftpdir/xcat/pxelinux.0") { - $::XNBA_callback->({ error => ["Unable to find pxelinux.0 from syslinux"], errorcode => [1] }); - return; }