Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Archiving:Backup
storeBackup
earlier_execute_precommand.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File earlier_execute_precommand.patch of Package storeBackup
Index: bin/storeBackup.pl =================================================================== --- bin/storeBackup.pl.orig +++ bin/storeBackup.pl @@ -2805,6 +2805,8 @@ if ($@) unless exists $suppressWarning{'use_DB_File'}; } + + # OS-Typ feststellen, um ARG_MAX zu setzen # Default wird vorsichtshalber auf 4 KB gesetzt! { @@ -2856,6 +2858,48 @@ $prLog->print('-kind' => 'I', '-str' => ["preserve Perms is not set"]) if $preservePerms eq 'no'; + +# +# precommand ausführen +# +if (defined $precommand) +{ + $prLog->print('-kind' => 'I', + '-str' => ["starting pre command <@$precommand> ..."]); + my ($preComm, @preParam) = (@$precommand); + my $preco = forkProc->new('-exec' => $preComm, + '-param' => \@preParam, + '-workingDir' => '.', + '-outRandom' => "$tmpdir/precomm-", + '-prLog' => $prLog); + $preco->wait(); + my $out = $preco->getSTDOUT(); + $prLog->print('-kind' => 'W', + '-str' => ["STDOUT of <@$precommand>:", @$out]) + if (@$out > 0); + $out = $preco->getSTDERR(); + $prLog->print('-kind' => 'E', + '-str' => ["STDERR of <@$precommand>:", @$out]) + if (@$out > 0); + + my $status = $preco->get('-what' => 'status'); + if ($status == 0) + { + $prLog->print('-kind' => 'I', + '-str' => + ["pre command <@$precommand> finished with status 0"]); + } + else + { + $prLog->print('-kind' => 'E', + '-str' => ["pre command <@$precommand> finished with " . + "status $status, exiting"]); + unlink $lockFile if $lockFile; + exit 1; + } +} + + # # initialise include, exclude and checkBlocks rules # @@ -3385,45 +3429,7 @@ $ENV{'STBU_logFile'} = $logFile; $ENV{'STBU_logInBackupDir'} = $logInBackupDir; $ENV{'logInBackupDirFileName'} = $logInBackupDirFileName; -# -# precommand ausführen -# -if (defined $precommand) -{ - $prLog->print('-kind' => 'I', - '-str' => ["starting pre command <@$precommand> ..."]); - my ($preComm, @preParam) = (@$precommand); - my $preco = forkProc->new('-exec' => $preComm, - '-param' => \@preParam, - '-workingDir' => '.', - '-outRandom' => "$tmpdir/precomm-", - '-prLog' => $prLog); - $preco->wait(); - my $out = $preco->getSTDOUT(); - $prLog->print('-kind' => 'W', - '-str' => ["STDOUT of <@$precommand>:", @$out]) - if (@$out > 0); - $out = $preco->getSTDERR(); - $prLog->print('-kind' => 'E', - '-str' => ["STDERR of <@$precommand>:", @$out]) - if (@$out > 0); - my $status = $preco->get('-what' => 'status'); - if ($status == 0) - { - $prLog->print('-kind' => 'I', - '-str' => - ["pre command <@$precommand> finished with status 0"]); - } - else - { - $prLog->print('-kind' => 'E', - '-str' => ["pre command <@$precommand> finished with " . - "status $status, exiting"]); - unlink $lockFile if $lockFile; - exit 1; - } -} #
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor