mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 13:22:36 +00:00 
			
		
		
		
	fix defect 3412
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15767 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -701,16 +701,16 @@ sub makescript
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    # get postscripts for images
 | 
			
		||||
    my $osimgname = $provmethod;
 | 
			
		||||
    my $et2;
 | 
			
		||||
    if($provmethod !~ /^install$|^netboot$|^statelite$/){ # using imagename
 | 
			
		||||
    
 | 
			
		||||
      my $osimgname = $provmethod;
 | 
			
		||||
 | 
			
		||||
    if($osimgname =~ /^install$|^netboot$|^statelite$/){
 | 
			
		||||
        $osimgname = "$os-$arch-$provmethod-$profile";
 | 
			
		||||
    }
 | 
			
		||||
    my $et2 =
 | 
			
		||||
      $et2 =
 | 
			
		||||
      $ostab->getAttribs({'imagename' => "$osimgname"}, ['postscripts', 'postbootscripts']);
 | 
			
		||||
    $ps = $et2->{'postscripts'};
 | 
			
		||||
    if ($ps)
 | 
			
		||||
    {
 | 
			
		||||
      $ps = $et2->{'postscripts'};
 | 
			
		||||
      if ($ps)
 | 
			
		||||
      {
 | 
			
		||||
        push @scriptd, "# osimage-postscripts-start-here\n";
 | 
			
		||||
 | 
			
		||||
        foreach my $n (split(/,/, $ps))
 | 
			
		||||
@@ -722,6 +722,7 @@ sub makescript
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        push @scriptd, "# osimage-postscripts-end-here\n";
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # get postscripts for node specific
 | 
			
		||||
@@ -784,9 +785,10 @@ sub makescript
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # get postbootscripts for image
 | 
			
		||||
    my $ips = $et2->{'postbootscripts'};
 | 
			
		||||
    if ($ips)
 | 
			
		||||
    {
 | 
			
		||||
    if($provmethod !~ /^install$|^netboot$|^statelite$/){ # using imagename
 | 
			
		||||
      my $ips = $et2->{'postbootscripts'};
 | 
			
		||||
      if ($ips)
 | 
			
		||||
      {
 | 
			
		||||
        my @xcatscripts;
 | 
			
		||||
        my @kitscripts;
 | 
			
		||||
        my @userscripts;
 | 
			
		||||
@@ -832,6 +834,7 @@ sub makescript
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        push @scriptd, "# osimage-postbootscripts-end-here\n";
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1188,12 +1188,11 @@ sub subvars_for_mypostscript {
 | 
			
		||||
    $os = $et->{'os'};
 | 
			
		||||
    $arch = $et->{'arch'};
 | 
			
		||||
    $profile = $et->{'profile'};
 | 
			
		||||
    my $osimgname;
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    my $osimgname = $provmethod;
 | 
			
		||||
    if($osimgname =~ /^(install|netboot|statelite)$/){
 | 
			
		||||
         $osimgname = "$os-$arch-$provmethod-$profile";
 | 
			
		||||
    }
 | 
			
		||||
    if($provmethod !~ /^install$|^netboot$|^statelite$/){ # using imagename
 | 
			
		||||
      $osimgname = $provmethod;
 | 
			
		||||
    } 
 | 
			
		||||
             
 | 
			
		||||
    my $osimage_vars;
 | 
			
		||||
    $osimage_vars = getImageitems_for_node($node, \%image_hash, $nodesetstate);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user