X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=installcheck%2FInstallcheck%2FClientService.pm;h=92b98dfab50ae9a98bb381c90a449ea6a1154810;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hp=942921a5d0ef0ea0b835b7f493cb06b16919d1bf;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/installcheck/Installcheck/ClientService.pm b/installcheck/Installcheck/ClientService.pm index 942921a..92b98df 100644 --- a/installcheck/Installcheck/ClientService.pm +++ b/installcheck/Installcheck/ClientService.pm @@ -37,6 +37,7 @@ sendbackup or selfcheck. service => 'amindexd', emulate => 'amandad', auth => 'bsdtcp', + auth_peer => 'localhost', process_done => $process_done); # or $service = Installcheck::ClientService->new( @@ -84,7 +85,8 @@ the name of the service to run. The C parameter determines how the service is invoked. The C and C parameters are described above. The C parameter gives a sub which is called with the service's wait status when the service exits and all of its file descriptors have been -drained. +drained. The C parameter gives the value for +C<$AMANDA_AUTHENTICATED_PEER> when emulating amandad. =head2 Killing Subprocess @@ -181,6 +183,7 @@ sub new { process_done => $params{'process_done'}, auth => $params{'auth'} || 'bsdtcp', args => $params{'args'} || [], + auth_peer => $params{'auth_peer'}, # all hashes keyed by stream name stream_fds => {}, @@ -375,6 +378,9 @@ sub _start_process_amandad { POSIX::close($in_c); } + delete $ENV{'AMANDA_AUTHENTICATED_PEER'}; + $ENV{'AMANDA_AUTHENTICATED_PEER'} = $self->{'auth_peer'} if $self->{'auth_peer'}; + # finally, execute! # braces avoid warning { exec { $service } $service, 'amandad', $self->{'auth'}; }