/usr/share/fusioninventory/lib/FusionInventory/Agent/Target/Local.pm is in fusioninventory-agent 1:2.3.10.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | package FusionInventory::Agent::Target::Local;
use strict;
use warnings;
use base 'FusionInventory::Agent::Target';
my $count = 0;
sub new {
my ($class, %params) = @_;
die "no path parameter" unless $params{path};
my $self = $class->SUPER::new(%params);
$self->{path} = $params{path};
$self->{format} = $params{html} ? 'html' :'xml';
$self->_init(
id => 'local' . $count++,
vardir => $params{basevardir} . '/__LOCAL__',
);
return $self;
}
sub getPath {
my ($self) = @_;
return $self->{path};
}
sub _getName {
my ($self) = @_;
return $self->{path};
}
sub _getType {
my ($self) = @_;
return 'local';
}
1;
__END__
=head1 NAME
FusionInventory::Agent::Target::Local - Local target
=head1 DESCRIPTION
This is a target for storing execution result in a local folder.
=head1 METHODS
=head2 new(%params)
The constructor. The following parameters are allowed, in addition to those
from the base class C<FusionInventory::Agent::Target>, as keys of the %params
hash:
=over
=item I<path>
the output directory path (mandatory)
=back
=head2 getPath()
Return the local output directory for this target.
|