diff --git a/xCAT-server/lib/xcat/plugins/mknb.pm b/xCAT-server/lib/xcat/plugins/mknb.pm index 62e088991..913c96c10 100644 --- a/xCAT-server/lib/xcat/plugins/mknb.pm +++ b/xCAT-server/lib/xcat/plugins/mknb.pm @@ -106,11 +106,15 @@ sub process_request { mkpath("$tftpdir/pxelinux.cfg"); chmod(0755,"$tftpdir/pxelinux.cfg"); if (! -r "$tftpdir/pxelinux.0") { - unless (-r "/usr/lib/syslinux/pxelinux.0") { + unless (-r "/usr/lib/syslinux/pxelinux.0" or -r "/usr/share/syslinux/pxelinux.0") { $callback->({error=>["Unable to find pxelinux.0 "],errorcode=>[1]}); return; } - copy("/usr/lib/syslinux/pxelinux.0","$tftpdir/pxelinux.0"); + if (-r "/usr/lib/syslinux/pxelinux.0") { + copy("/usr/lib/syslinux/pxelinux.0","$tftpdir/pxelinux.0"); + } else { + copy("/usr/share/syslinux/pxelinux.0","$tftpdir/pxelinux.0"); + } chmod(0644,"$tftpdir/pxelinux.0"); } }