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 "") {
|
if ($upgrade{$upgrade}{pl} ne "") {
|
||||||
my $cmd = $perl." ".$upgrade{$upgrade}{pl}." --configFile=".$filename;
|
my $pid = fork;
|
||||||
$cmd .= " --quiet" if ($quiet);
|
if (!$pid) {
|
||||||
if (system($cmd)) {
|
@ARGV = ("--configFile=$filename", $quiet ? ('--quiet') : ());
|
||||||
print "\tProcessing upgrade executable failed!\n";
|
$0 = $upgrade{$upgrade}{pl};
|
||||||
fatalError();
|
do $0;
|
||||||
}
|
exit;
|
||||||
|
}
|
||||||
|
waitpid $pid, 0;
|
||||||
|
if ($?) {
|
||||||
|
print "\tProcessing upgrade executable failed!\n";
|
||||||
|
fatalError();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$config{$filename}{version} = $upgrade{$upgrade}{to};
|
$config{$filename}{version} = $upgrade{$upgrade}{to};
|
||||||
$notRun = 0;
|
$notRun = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue