Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.3.x' into 2.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonéri Le Bouder committed Aug 6, 2012
2 parents c9b81d4 + b2969d9 commit db90d2d
Show file tree
Hide file tree
Showing 36 changed files with 665 additions and 392 deletions.
20 changes: 10 additions & 10 deletions etc/agent.cfg
Expand Up @@ -26,7 +26,7 @@
# Target scheduling options
#

# maximum initial delay before first target, in seconds
# maximum delay before first target, in seconds
delaytime = 3600
# do not contact the target before next scheduled time
lazy = 0
Expand All @@ -47,7 +47,7 @@ backend-collect-timeout = 30
force = 0
# mark the machine with given tag
tag =
# additional content inventory file
# additional inventory content file
additional-content =

#
Expand All @@ -61,30 +61,30 @@ no-p2p = 0
# Network options
#

# proxy address, e.g: http://user:pass@proxy:port
# proxy address
proxy =
# user name for server authentication
user =
# password for server authentication
password =
# path to the CA certificates directory
# CA certificates directory
ca-cert-dir =
# path to the CA certificates file
# CA certificates file
ca-cert-file =
# do not check server SSL certificates
# do not check server SSL certificate
no-ssl-check = 0
# connection timeout
# connection timeout, in seconds
timeout = 180

#
# Web interface options
#

# do not use web interface
# disable embedded web server
no-httpd = 0
# network interface to listen to
httpd-ip =
# network port to list to
# network port to listen to
httpd-port = 62354
# trust requests without authentication token
httpd-trust =
Expand All @@ -97,7 +97,7 @@ httpd-trust =
logger = stderr
# log file
#logfile = /var/log/fusioninventory.log
# maximum log file size
# maximum log file size, in MB
#logfile-maxsize = 0
# Syslog facility
logfacility = LOG_USER
Expand Down
197 changes: 112 additions & 85 deletions fusioninventory-agent
Expand Up @@ -117,62 +117,71 @@ fusioninventory-agent - FusionInventory agent For Linux/UNIX, Windows and MacOSX
B<fusioninventory-agent> [options] [--server server|--local path]
Target definition options
-s --server=URI send tasks result to a server
-l --local=PATH write tasks results locally
Target scheduling options
--delaytime=DURATION maximum initial delay before first target, in seconds (3600)
--lazy do not contact the target before next scheduled time
Task selection options
--list-tasks list available tasks and exit
--no-task=TASK do not run given task
Inventory task specific options
--no-category=CATEGORY do not list given category items
--scan-homedirs allow to scan use home directories (false)
--html save the inventory as HTML (false)
-f --force always send data to server (false)
-t --tag=TAG mark the machine with given tag
--backend-collect-timeout timeout for inventory modules execution (30)
--additional-content=FILE additional inventory content
Package deployment task specific options
--no-p2p do not use peer to peer to download files (false)
Target definition options:
-s --server=URI send tasks result to a server
-l --local=PATH write tasks results locally
Target scheduling options:
--delaytime=LIMIT maximum delay before first target,
in seconds (3600)
--lazy do not contact the target before
next scheduled time
Task selection options:
--list-tasks list available tasks and exit
--no-task=TASK do not run given task
Inventory task specific options:
--no-category=CATEGORY do not list given category items
--scan-homedirs scan use home directories (false)
--html save the inventory as HTML (false)
-f --force always send data to server (false)
-t --tag=TAG mark the machine with given tag
--backend-collect-timeout=TIME timeout for inventory modules
execution (30)
--additional-content=FILE additional inventory content file
Package deployment task specific options:
--no-p2p do not use peer to peer to download
files (false)
Network options:
-P --proxy=PROXY proxy address
-u --user=USER user name for server authentication
-p --password=PWD password for server authentication
--ca-cert-dir=D path to the CA certificates directory
--ca-cert-file=F path to the CA certificates file
--no-ssl-check do not check server SSL certificates (false)
--timeout connection timeout (180)
Web interface options
--no-httpd disable embedded web server (false)
--httpd-ip=IP network interface to listen to
--httpd-port=PORT network port to listen to (62354)
--httpd-trust=RANGE trust requests from range without authentication token (false)
Logging options
--logger=BACKEND logger backend [Stderr|File|Syslog] (Stderr)
--logfile=FILE log file
--logfile-maxsize=X maximum size of the log file in MB (0)
--logfacility=FACILITY syslog facility (LOG_USER)
--color use color in the console (false)
Configuration options
--config=BACKEND configuration backend [file|registry|none]
--conf-file=FILE configuration file
Execution mode options
-w --wait=DURATION maximum delay before execution, in seconds
-d --daemon run the agent as a daemon (false)
--no-fork don't fork in background (false)
--debug debug mode (false)
--version print the version and exit
-P --proxy=PROXY proxy address
-u --user=USER user name for server authentication
-p --password=PASSWORD password for server authentication
--ca-cert-dir=DIRECTORY CA certificates directory
--ca-cert-file=FILE CA certificates file
--no-ssl-check do not check server SSL certificate
(false)
--timeout=TIME connection timeout, in seconds (180)
Web interface options:
--no-httpd disable embedded web server (false)
--httpd-ip=IP network interface to listen to (all)
--httpd-port=PORT network port to listen to (62354)
--httpd-trust=IP trust requests without authentication
token (false)
Logging options:
--logger=BACKEND logger backend (stderr)
--logfile=FILE log file
--logfile-maxsize=SIZE maximum size of the log file in MB (0)
--logfacility=FACILITY syslog facility (LOG_USER)
--color use color in the console (false)
Configuration options:
--config=BACKEND configuration backend
--conf-file=FILE configuration file
Execution mode options:
-w --wait=LIMIT maximum delay before execution,
in seconds
-d --daemon run the agent as a daemon (false)
--no-fork don't fork in background (false)
--debug debug mode (false)
--setup print the agent setup directories
and exit
--version print the version and exit
=head1 DESCRIPTION
Expand Down Expand Up @@ -262,14 +271,17 @@ This option is only available when the agent is not run as a server.
=over
=item B<--no-task>=I<TASK>
Disable the given task
=item B<--list-tasks>
List available tasks and exit
=item B<--no-task>=I<TASK>
Do not run given task.
Multiple values can be specified, using comma as a separator. See option
I<--list-tasks> for the list of available tasks.
=back
=head2 Inventory task specific options
Expand All @@ -278,7 +290,10 @@ List available tasks and exit
=item B<--no-category>=I<CATEGORY>
Do not list given category items in inventory. It can be:
Do not list given category items in inventory.
Multiple values can be specified, using comma as a separator. The available
categories are:
=over 4
Expand Down Expand Up @@ -322,6 +337,13 @@ Mark the machine with given tag.
Timeout for inventory modules execution.
=item B<--additional-content>=I<FILE>
Additional inventory content file.
This file should be an XML file, using same syntax as the one produced by the
agent.
=back
=head2 Package deployment task specific options
Expand Down Expand Up @@ -352,20 +374,21 @@ Use I<USER> for server authentication.
Use I<PASSWORD> for server authentication.
=item B<--ca-cert-dir>=I<PATH>
=item B<--ca-cert-dir>=I<DIRECTORY>
Path to the CA certificates directory.
CA certificates directory.
=item B<--ca-cert-file>=I<FILE>
Path to the CA certificates file.
CA certificates file.
=item B<--no-ssl-check>
Do not check server SSL certificates.
Do not check server SSL certificate.
=item B<--timeout>=I<TIME>
Hint: you can set HTTPS_DEBUG environment variable to get SSL error messages in
the console.
Timeout for server connections.
=back
Expand All @@ -379,24 +402,22 @@ Disable the embedded web server.
=item B<--httpd-ip>=I<IP>
The network interface to use for the embedded web server (all
available interfaces).
The network interface to use for the embedded web server (all).
=item B<--httpd-port>=I<PORT>
The network port to use for the embedded web server (62354).
=item B<--httpd-trust>=I<RANGE>
=item B<--httpd-trust>=I<IP>
Trust requests from given range without authentication token (false).
Trust requests from given addresses without authentication token (false).
For example: "192.168.0.0/24", "192.68.168.0.5" or an IP range like
"20.34.101.207 - 201.3.9.99". See L<Net::IP> documentation to get more example.
For example: "192.168.0.0/24", "192.168.168.0.5" or an IP range like
"20.34.101.207 - 201.3.9.99". Hostnames are also accepted. See L<Net::IP>
documentation to get more example.
Multiple values can be specified, using comma as a separator.
Non-numeric hostname are also accepted.
=back
=head2 Logging options
Expand All @@ -405,7 +426,10 @@ Non-numeric hostname are also accepted.
=item B<--logger>=I<BACKEND>
Logger backend to use. It can be:
Logger backend to use.
Multiple values can be specified, using comma as a separator. The available
backends are:
=over 4
Expand All @@ -419,25 +443,25 @@ file: log messages in a file.
=item
syslog: log messages through the local syslog server
syslog: log messages through the local syslog server.
=back
Multiple values can be specified, using comma as a separator.
=item B<--logfile>=I<FILE>
Log message in I<FILE> (implies File logger backend)
Log message in I<FILE> (implies File logger backend).
=item B<--logfile-maxsize>=I<FILE>
=item B<--logfile-maxsize>=I<SIZE>
Max logfile size in MB, default is unlimited. When the max size is reached, the
file is truncated. This is only useful if there is no log rotation mechanism on
the system.
=item B<--logfacility>=I<FACILITY>
Syslog facility to use (default LOG_USER)
Syslog facility to use (default LOG_USER).
=item B<--color>
Expand All @@ -451,30 +475,33 @@ This options is ignored on Windows.
=over
=item B<--conf-file>=I<FILE>
Use I<FILE> as configuration file (implies file configuration backend)
=item B<--config>=I<BACKEND>
Configuration backend to use. It can be:
Configuration backend to use.
The available backends are:
=over 4
=item
file: read configuration from a file (default anywhere else as Windows)
file: read configuration from a file (default anywhere else as Windows).
=item
registry: read configuration from the registry (default on Windows)
registry: read configuration from the registry (default on Windows).
=item
none: don't read any configuration
none: don't read any configuration.
=back
=item B<--conf-file>=I<FILE>
Use I<FILE> as configuration file (implies file configuration backend).
=back
=head2 Execution mode options
Expand Down
7 changes: 4 additions & 3 deletions lib/FusionInventory/Agent/Task/Inventory.pm
Expand Up @@ -61,10 +61,11 @@ sub run {
}

if (not $ENV{PATH}) {
# set a minimal PATH if none is set (#1129)
$ENV{PATH} = '/sbin:/usr/sbin:/bin:/usr/bin';
# set a minimal PATH if none is set (#1129, #1747)
$ENV{PATH} =
'/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin';
$self->{logger}->debug(
"PATH is not set, using /sbin:/usr/sbin:/bin:/usr/bin as default"
"PATH is not set, using $ENV{PATH} as default"
);
}

Expand Down

0 comments on commit db90d2d

Please sign in to comment.