-# Copyright (c) 2010 Zmanda, Inc. All Rights Reserved.
+# Copyright (c) 2010-2012 Zmanda, Inc. All Rights Reserved.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
service => 'amindexd',
emulate => 'amandad',
auth => 'bsdtcp',
+ auth_peer => 'localhost',
process_done => $process_done);
# or
$service = Installcheck::ClientService->new(
service is invoked. The C<args> and C<auth> parameters are described above.
The C<process_done> 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<auth_peer> parameter gives the value for
+C<$AMANDA_AUTHENTICATED_PEER> when emulating amandad.
=head2 Killing Subprocess
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 => {},
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'}; }