mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	Have mknb and pxe plugins try to fix lack of pxelinux.0 and error out on complete failure
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@585 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -94,6 +94,16 @@ sub process_request {
 | 
			
		||||
      } 
 | 
			
		||||
   }
 | 
			
		||||
   my $cfgfile;
 | 
			
		||||
   if ($arch =~ /x86/) {
 | 
			
		||||
      if (! -r "$tftpdir/pxelinux.0") {
 | 
			
		||||
         unless (-r "/usr/lib/syslinux/pxelinux.0") {
 | 
			
		||||
            $callback->({error=>["Unable to find pxelinux.0 "],errorcode=>[1]});
 | 
			
		||||
            return;
 | 
			
		||||
         }
 | 
			
		||||
         copy("/usr/lib/syslinux/pxelinux.0","$tftpdir/pxelinux.0");
 | 
			
		||||
         chmod(0644,"$tftpdir/pxelinux.0");
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   foreach (keys %{$hexnets}) {
 | 
			
		||||
      if ($arch =~ /x86/) {
 | 
			
		||||
         open($cfgfile,">","$tftpdir/pxelinux.cfg/".uc($_));
 | 
			
		||||
 
 | 
			
		||||
@@ -202,6 +202,18 @@ sub process_request {
 | 
			
		||||
        push @nodes,$_;
 | 
			
		||||
     }
 | 
			
		||||
  }
 | 
			
		||||
  if (! -r "$tftpdir/pxelinux.0") {
 | 
			
		||||
     unless (-r "/usr/lib/syslinux/pxelinux.0") {
 | 
			
		||||
       $callback->({error=>["Unable to find pxelinux.0 "],errorcode=>[1]});
 | 
			
		||||
       return;
 | 
			
		||||
     }
 | 
			
		||||
     copy("/usr/lib/syslinux/pxelinux.0","$tftpdir/pxelinux.0");
 | 
			
		||||
     chmod(0644,"$tftpdir/pxelinux.0");
 | 
			
		||||
   }
 | 
			
		||||
   unless ( -r "$tftpdir/pxelinux.0" ) {
 | 
			
		||||
      $callback->({errror=>["Unable to find pxelinux.0 from syslinux"],errorcode=>[1])};
 | 
			
		||||
      return;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
  if (ref($request->{arg})) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user