mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	fix5209 nodeset cannot find pxelinux.0 (#5783)
* distro pxelinux.0 default path is changed in ubuntu 16.04
This commit is contained in:
		| @@ -253,6 +253,10 @@ sub process_request { | ||||
|             copy("/usr/lib/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); | ||||
|         } elsif (-r "/usr/share/syslinux/pxelinux.0") { | ||||
|             copy("/usr/share/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); | ||||
|         } elsif ("/usr/lib/PXELINUX/pxelinux.0") { | ||||
|             copy("/usr/lib/PXELINUX/pxelinux.0", "$tftpdir/pxelinux.0"); | ||||
|         } else { | ||||
|             copy("/opt/xcat/share/xcat/netboot/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); | ||||
|         } | ||||
|         if (-r "$tftpdir/pxelinux.0") { | ||||
|             chmod(0644, "$tftpdir/pxelinux.0"); | ||||
|   | ||||
| @@ -478,24 +478,19 @@ sub process_request { | ||||
|     } | ||||
|  | ||||
|     #end prescripts code | ||||
|     if (!-r "$tftpdir/pxelinux.0") { | ||||
|         unless (-r "/usr/lib/syslinux/pxelinux.0" or -r "/usr/share/syslinux/pxelinux.0") { | ||||
|             $::PXE_callback->({ error => ["Unable to find pxelinux.0 "], errorcode => [1] }); | ||||
|             return; | ||||
|     my @pxelinuxpaths=("/usr/lib/syslinux/pxelinux.0","/usr/share/syslinux/pxelinux.0","/usr/lib/PXELINUX/pxelinux.0","/opt/xcat/share/xcat/netboot/syslinux/pxelinux.0"); | ||||
|     foreach $path (@pxelinuxpaths) { | ||||
|         if (-r "$path") { | ||||
|             copy("$path","$globaltftpdir/pxelinux.0"); | ||||
|             chmod(0644, "$globaltftpdir/pxelinux.0"); | ||||
|             last; | ||||
|         } | ||||
|         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"); | ||||
|     } | ||||
|     unless (-r "$tftpdir/pxelinux.0") { | ||||
|         $::PXE_callback->({ errror => ["Unable to find pxelinux.0 from syslinux"], errorcode => [1] }); | ||||
|     unless (-r "$globaltftpdir/pxelinux.0") { | ||||
|         $::PXE_callback->({ errror => ["Unable to find pxelinux.0 from syslinux or pxelinux"], errorcode => [1] }); | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|  | ||||
|     $errored = 0; | ||||
|     my %bphash; | ||||
|     my $inittime = 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user