process upgrade scripts in forks to carry over -I includes and anything else
This commit is contained in:
parent
9940ceb7c7
commit
6278278508
1 changed files with 12 additions and 6 deletions
|
|
@ -226,12 +226,18 @@ foreach my $filename (keys %config) {
|
|||
}
|
||||
}
|
||||
if ($upgrade{$upgrade}{pl} ne "") {
|
||||
my $cmd = $perl." ".$upgrade{$upgrade}{pl}." --configFile=".$filename;
|
||||
$cmd .= " --quiet" if ($quiet);
|
||||
if (system($cmd)) {
|
||||
print "\tProcessing upgrade executable failed!\n";
|
||||
fatalError();
|
||||
}
|
||||
my $pid = fork;
|
||||
if (!$pid) {
|
||||
@ARGV = ("--configFile=$filename", $quiet ? ('--quiet') : ());
|
||||
$0 = $upgrade{$upgrade}{pl};
|
||||
do $0;
|
||||
exit;
|
||||
}
|
||||
waitpid $pid, 0;
|
||||
if ($?) {
|
||||
print "\tProcessing upgrade executable failed!\n";
|
||||
fatalError();
|
||||
}
|
||||
}
|
||||
$config{$filename}{version} = $upgrade{$upgrade}{to};
|
||||
$notRun = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue