2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-01-11 10:52:41 +00:00

Do not error on missing pxelinux.0

It is not always needed anymore, in fact it is rarely
used.
This commit is contained in:
Jarrod Johnson
2020-10-02 08:31:48 -04:00
parent f503115b7e
commit 4f0a510668

View File

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