mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	pre-create mypostscript enhancement: remove the old mypostscript. if site.precreatemypostscripts=0
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14219 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -101,7 +101,6 @@ sub create_mypostscript_or_not { | ||||
|   my $nodes  = $request->{node}; | ||||
|  | ||||
|   my $tftpdir = xCAT::TableUtils::getTftpDir(); | ||||
|   system("rm -rf $tftpdir/mypostscripts"); | ||||
|     #if precreatemypostscripts=1, create each mypostscript for each node | ||||
|   my @entries =  xCAT::TableUtils->get_site_attribute("precreatemypostscripts"); | ||||
|   if ($entries[0] ) { | ||||
| @@ -112,7 +111,13 @@ sub create_mypostscript_or_not { | ||||
|             if ($request->{scripttype}) { $state = $request->{scripttype}->[0];} | ||||
|             xCAT::Postage::makescript($nodes, $state, $callback);    | ||||
|         } | ||||
|   } | ||||
|   } else { | ||||
|        #if the site.precreatemypostscripts=0, we will remove the mypostscript.$n | ||||
|        foreach my $n (@$nodes ) { | ||||
|                unlink("$tftpdir/mypostscripts/mypostscript.$n"); | ||||
|        }   | ||||
|     } | ||||
|  | ||||
|  | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user