mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-03 21:02:34 +00:00 
			
		
		
		
	-Use xNBA even for Etherboot (it should have patches to fix Etherboot compatibility)
-Change pxelinpx.0 handling to ensure it is the version that we have done version validation on -Use pxelinux.0 out of a directory under 'xcat' so that xCAT maintains a healthier filesystem namespace to avoid conflicts git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4035 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -1055,7 +1055,7 @@ sub addnet
 | 
			
		||||
        push @netent, "    } else if option client-architecture = 00:00  { #x86\n";
 | 
			
		||||
        push @netent, "      filename \"xcat/xnba.kpxe\";\n";
 | 
			
		||||
        push @netent, "    } else if option vendor-class-identifier = \"Etherboot-5.4\"  { #x86\n";
 | 
			
		||||
        push @netent, "      filename \"pxelinux.0\";\n";
 | 
			
		||||
        push @netent, "      filename \"xcat/xnba.kpxe\";\n";
 | 
			
		||||
        push @netent,
 | 
			
		||||
          "    } else if option client-architecture = 00:02 { #ia64\n ";
 | 
			
		||||
        push @netent, "      filename \"elilo.efi\";\n";
 | 
			
		||||
 
 | 
			
		||||
@@ -117,7 +117,7 @@ sub setstate {
 | 
			
		||||
    	($kernel,$hypervisor) = split /!/,$kern->{kernel};
 | 
			
		||||
    	print $pcfg " set 209:string xcat/xnba/nodes/$node.pxelinux\n";
 | 
			
		||||
    	print $pcfg " set 210:string http://".'${next-server}'."/tftpboot/\n";
 | 
			
		||||
    	print $pcfg " imgfetch -n pxelinux.0 http://".'${next-server}'."/tftpboot/pxelinux.0\n";
 | 
			
		||||
    	print $pcfg " imgfetch -n pxelinux.0 http://".'${next-server}'."/tftpboot/xcat/pxelinux.0\n";
 | 
			
		||||
    	print $pcfg " imgload pxelinux.0\n";
 | 
			
		||||
    	print $pcfg " imgexec pxelinux.0\n";
 | 
			
		||||
        close($pcfg);
 | 
			
		||||
@@ -128,7 +128,7 @@ sub setstate {
 | 
			
		||||
        if ($kern->{kernel} =~ /\.c32\z/ or $kern->{kernel} eq 'memdisk') { #gPXE comboot support seems insufficient, chain pxelinux instead
 | 
			
		||||
        	print $pcfg " set 209:string xcat/xnba/nodes/$node.pxelinux\n";
 | 
			
		||||
        	print $pcfg " set 210:string http://".'${next-server}'."/tftpboot/\n";
 | 
			
		||||
        	print $pcfg " imgfetch -n pxelinux.0 http://".'${next-server}'."/tftpboot/pxelinux.0\n";
 | 
			
		||||
        	print $pcfg " imgfetch -n pxelinux.0 http://".'${next-server}'."/tftpboot/xcat/pxelinux.0\n";
 | 
			
		||||
        	print $pcfg " imgload pxelinux.0\n";
 | 
			
		||||
        	print $pcfg " imgexec pxelinux.0\n";
 | 
			
		||||
            close($pcfg);
 | 
			
		||||
@@ -403,19 +403,15 @@ sub process_request {
 | 
			
		||||
  }  
 | 
			
		||||
 | 
			
		||||
  #back to normal business
 | 
			
		||||
  if (! -r "$tftpdir/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]});
 | 
			
		||||
  if (! -r "$tftpdir/xcat/pxelinux.0") {
 | 
			
		||||
    unless (-r $::XCATROOT."share/xcat/netboot/syslinux/pxelinux.0") {
 | 
			
		||||
       $callback->({error=>["Unable to find pxelinux.0 at ".$::XCATROOT."share/xcat/netboot/syslinux/pxelinux.0"],errorcode=>[1]});
 | 
			
		||||
       return;
 | 
			
		||||
    }
 | 
			
		||||
    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");
 | 
			
		||||
     }
 | 
			
		||||
    copy($::XCATROOT."share/xcat/netboot/syslinux/pxelinux.0","$tftpdir/xcat/pxelinux.0");
 | 
			
		||||
     chmod(0644,"$tftpdir/pxelinux.0");
 | 
			
		||||
  }
 | 
			
		||||
  unless ( -r "$tftpdir/pxelinux.0" ) {
 | 
			
		||||
  unless ( -r "$tftpdir/xcat/pxelinux.0" ) {
 | 
			
		||||
     $callback->({errror=>["Unable to find pxelinux.0 from syslinux"],errorcode=>[1]});
 | 
			
		||||
     return;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user