spelling mistake for Script_Post make script_post fail to work

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15932 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
amy0701 2013-04-10 11:34:17 +00:00
parent cb445f14ec
commit adbb9d5609

View File

@ -254,7 +254,7 @@ sub getConfig
}
if(exists $config{script_post}){
log_this("Script_Prev:");
log_this("Script_Post:");
foreach $cmd (@{$config{script_post}}){
log_this(" $cmd");
}
@ -370,7 +370,7 @@ sub uninit
log_this("******************************");
log_this("un-initialize xCAT test evironment");
log_this("******************************");
# my $cmd = undef;;
my $cmd = undef;;
# if(exists $config{object}){
# foreach my $type (keys %{$config{object}}){
# foreach my $name (keys %{$config{object}{$type}}){
@ -397,14 +397,15 @@ sub uninit
# }
# }
# }
# foreach $cmd (@{$config{script_post}}){
# log_this($cmd);
# runcmd($cmd);
# if($::RUNCMD_RC != 0){
# log_this("Fail to run $cmd");
# return 1;
# }
# }
foreach $cmd (@{$config{script_post}}){
log_this($cmd);
runcmd($cmd);
if($::RUNCMD_RC != 0){
log_this("Fail to run $cmd");
return 1;
}
}
&runcmd("restorexCATdb -p /tmp/xCATdbbackup");
&runcmd("rm -rf /tmp/xCATdbbackup");
return 0;