mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	make subvars could handle the var in #INCLUDE
This commit is contained in:
		| @@ -154,6 +154,25 @@ sub subvars { | ||||
|   #do *all* includes, recursive and all | ||||
|   my $doneincludes=0; | ||||
|   while (not $doneincludes) { | ||||
|       $doneincludes=1; | ||||
|       $inc =~ s/#ENV:([^#]+)#/envvar($1)/eg;  # handle the variable in #INCLUDE | ||||
|       if ($inc =~ /#INCLUDE_PKGLIST:[^#^\n]+#/) { | ||||
|           $doneincludes=0; | ||||
|           $inc =~ s/#INCLUDE_PKGLIST:([^#^\n]+)#/includefile($1, 0, 1)/eg; | ||||
|       } | ||||
|       if ($inc =~ /#INCLUDE_PTRNLIST:[^#^\n]+#/) { | ||||
|           $doneincludes=0; | ||||
|           $inc =~ s/#INCLUDE_PTRNLIST:([^#^\n]+)#/includefile($1, 0, 2)/eg; | ||||
|       } | ||||
|       if ($inc =~ /#INCLUDE_RMPKGLIST:[^#^\n]+#/) { | ||||
|           $doneincludes=0; | ||||
|           $inc =~ s/#INCLUDE_RMPKGLIST:([^#^\n]+)#/includefile($1, 0, 3)/eg; | ||||
|       } | ||||
|       if ($inc =~ /#INCLUDE:[^#^\n]+#/) { | ||||
|           $doneincludes=0; | ||||
|           $inc =~ s/#INCLUDE:([^#^\n]+)#/includefile($1, 0, 0)/eg; | ||||
|       } | ||||
|  | ||||
|       #support multiple paths of osimage in rh/sles diskfull installation | ||||
|       my @pkgdirs; | ||||
|       if ( defined($media_dir) ) { | ||||
| @@ -240,7 +259,7 @@ sub subvars { | ||||
|                   $partcontent .= $_; | ||||
|               } | ||||
|               close ($inh); | ||||
|        | ||||
|  | ||||
|               #the content of the specified file is a script which can write partition definition into /tmp/partitionfile | ||||
|               if ($scriptflag){ | ||||
|                   #for redhat/sl/centos/kvm/fedora | ||||
| @@ -279,7 +298,7 @@ sub subvars { | ||||
|           } | ||||
|       } | ||||
|  | ||||
|       $doneincludes=1; | ||||
|       $inc =~ s/#ENV:([^#]+)#/envvar($1)/eg;  # handle the variable in #INCLUDE | ||||
|       if ($inc =~ /#INCLUDE_PKGLIST:[^#^\n]+#/) { | ||||
|           $doneincludes=0; | ||||
|           $inc =~ s/#INCLUDE_PKGLIST:([^#^\n]+)#/includefile($1, 0, 1)/eg; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user