diff -Nru fusioninventory-agent-2.1.10/AUTHORS fusioninventory-agent-2.2.0/AUTHORS --- fusioninventory-agent-2.1.10/AUTHORS 2011-09-05 08:23:02.000000000 +0000 +++ fusioninventory-agent-2.2.0/AUTHORS 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -maintainer: - Gonéri LE BOUDER - -Copyright 2006-2010 OCS Inventory contributors -Copyright 2010-2011 FusionInventory Team - -Website: http://www.fusioninventory.org - -Please read THANKS to get the list of the contributors diff -Nru fusioninventory-agent-2.1.10/Changes fusioninventory-agent-2.2.0/Changes --- fusioninventory-agent-2.1.10/Changes 2011-09-06 09:24:01.000000000 +0000 +++ fusioninventory-agent-2.2.0/Changes 2012-04-07 16:57:54.000000000 +0000 @@ -1,4 +1,158 @@ -Revision history for FusionInventory::Agent +Revision history for FusionInventory agent + +2.2.0 Sat, 07 Apr 2012 18:57:49 +0200 + +Major changes: +* large speed improvement: up to 150% for a local inventory +* better multitasking support: + - the agent use fork() to run task if needed, instead of running a new process + from scratch, avoiding the need to use a temporary file to transmit + parameters, with related security risks + - the agent only forks to run a tasks when running as a server, making tracing + and debugging easier + - the agent only use one thread for the web interface +* better SSL support: + - IO::Socket::SSL perl module is now required for certificate validation + - Crypt::SSLeay perl module still allow HTTPS support, but without + certificate validation, and the connection will be aborted unless + certificate checking is disabled + - validation is now performed by SSL library, and honours alternative subject + names, and other subtilities +* large cleanup of values returned from inventory: + - unknown values are filtered out + - strings are trimmed for trailing spaces + - irrelevant values, such as windows internal USB serial number, or + controllers type and manufacturer on AIX and HPUX, are filtered out +* installation procedure automatically setup configuration and data directories + locations in executable, there is no need to manually configure them anymore +* removal of useless features: + - support for OCS account info have been dropped, the agent doesn't store + arbitrary informations locally anymore + - support for OCS network discovery and software deployment features within + inventory task have been removed, we have better alternatives + - useless Ping task has been dropped +* cleanup of available options: + - deprecated --nosoft and --nosoftware options have been removed + - --devlib, --share-dir, --basevardir and --realm options have been + deprecated, as their values are now computed automatically at installation + - --daemon-no-fork option has been deprecated, and replaced by --daemon + --no-fork options + - --info option has been deprecated, as it had no effect + - --rpc-trust-localhost option has been deprecated, in favor of a more + generic --http-trust option, allowing an arbitrary IP adresse or range + - --debug option can be specified multiple times, for additional verbosity + - --no-inventory, --no-ocsdeploy, --no-snmpquery, --no-netdiscovery options + have been deprecated in favor of a generic --no-task option + - --no-software, --no-printer options have been deprecated in favor of a + generic --no-category option, and 'environment' value support has been added +* new --config option allows to select configuration backend, allowing to use + file configuration if needed under windows, or to ignore any external + configuration +* fusioninventory-agent-config executable has been dropped, in favor of better + documentation +* documentation has been reviewed for consistency in various places where it + appears (--help output, man page, configuration file) +* XML::TreePP perl module is now used instead of XML::Simple, reducing native + perl modules dependencies +* OcsDeploy task is now deprecated. Please continue to use the 2.1.x agent is + you need it. + +Minor changes: +* Add the HARDWARE/CHASSIS_TYPE information +* Linux: report all IP addresses used by each interfaces (#854) +* HPUX: don't report unoccupied memory slots +* AIX: add LVM support + +2.1.14 Wed, 22 Feb 2012 14:56:51 -0000 + +LINUX + ✔ Detected OS is "RedHat" for CentOS servers if lsb_release not available + commit:d3a252 + http://forge.fusioninventory.org/issues/1193 + thanks: Jonathan Clarke + +MACOSX + ✔ no-software option doesn't work as advertised + commit:18dfaf + http://forge.fusioninventory.org/issues/1476 + thanks: Ronan Mejecaze + ✔ syntax error in Video module + thanks: Walid Nouh + +WINDOWS + ✔ No 2007 Microsoft Office system into XML + commit:39f3c7 + http://forge.fusioninventory.org/issues/1065 + thanks: Walid Nouh, Xavier Caillaud, jerome slayer + ✔ On Windows Vista Office 2007 is not correctly gathered + commit:39f3c7 + http://forge.fusioninventory.org/issues/1425 + thanks: Walid Nouh, Xavier Caillaud + ✔ VM System incorrect + commit:259996 + http://forge.fusioninventory.org/issues/1436 + thanks: Mario Gzuk + ✔ Inventory Internet Explorer when it's not present in Add/remove programs + commit:39f3c7 + http://forge.fusioninventory.org/issues/1441 + thanks: Walid Nouh, Xavier Caillaud, jerome slayer + +2.1.13 Wed, 14 Dec 2011 13:06:44 +0100 + +TEST-SUITE + ✔ 2.1.10 Test suite fails + commit:8035bd + http://forge.fusioninventory.org/issues/1161 + thanks: Remi Collet + +WINDOWS + ✔ VM System incorrect + commit:b59a09 + http://forge.fusioninventory.org/issues/1391 + thanks: Mario Gzuk + ✔ Fix the CPU detection on Windows + thanks: Anthony Facchin + +2.1.12 Wed, 23 Nov 2011 18:14:52 +0100 + +GENERIC + ✔ Memory: Add ECC / no ECC information + commit:b01f6f + http://forge.fusioninventory.org/issues/1234 + thanks: Walid Nouh, jerome slayer + +LINUX + ✔ Duplication virtualmachine name on the same machine + commit:982c08 + http://forge.fusioninventory.org/issues/1140 + thanks: DuyLong LE + +WINDOWS + ✔ [windows] Virtual network adapter reported as physical - and breaks all computer linking in GLPI + commit:5b4a1e + http://forge.fusioninventory.org/issues/1166 + thanks: David Durieux, V'yacheslav Stetskevych + ✔ use $ENV{COMPUTERNAME} is HARDWARE/NAME is empty + commit:44c07b + http://forge.fusioninventory.org/issues/1330 + ✔ 2.1.11 - Total amount of total RAM memory incorrectly detected on some Windows 7 computers + commit:f93d24 + http://forge.fusioninventory.org/issues/1334 + thanks: Tomás Abad, Andre Silva + ✔ Dual screen configuration ignored on Windows Vista/7 + commit:6cbf8b + http://forge.fusioninventory.org/issues/1351 + +SOLARIS + ✔ Fix some warnings for spurious stat() calls + ✔ Fix hostname being forced to 'SOLARIS' + +2.1.11 Mon, 12 Sep 2011 17:34:38 +0200 + +WINDOWS + ✔ Fix the BIOS information collect on Win2003 <= system + commit:8c2427da5, commit: fe345815 + http://forge.fusioninventory.org/issues/1156 2.1.10 Tue, 06 Sep 2011 08:48:27 -0000 diff -Nru fusioninventory-agent-2.1.10/contrib/debian/fusioninventory-agent.init fusioninventory-agent-2.2.0/contrib/debian/fusioninventory-agent.init --- fusioninventory-agent-2.1.10/contrib/debian/fusioninventory-agent.init 1970-01-01 00:00:00.000000000 +0000 +++ fusioninventory-agent-2.2.0/contrib/debian/fusioninventory-agent.init 2012-04-05 08:25:15.000000000 +0000 @@ -0,0 +1,152 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: fusioninventory-agent +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: FusionInventory Agent +# Description: This script launch FusionInventory Agent as daemon +### END INIT INFO + +# Author: Gonéri Le Bouder +# + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="FusionInventory Agent" +NAME=fusioninventory-agent +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME +DAEMON_ARGS="-d -s $SERVER" + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff -Nru fusioninventory-agent-2.1.10/contrib/Tarballs.pm fusioninventory-agent-2.2.0/contrib/Tarballs.pm --- fusioninventory-agent-2.1.10/contrib/Tarballs.pm 2011-09-05 15:07:58.000000000 +0000 +++ fusioninventory-agent-2.2.0/contrib/Tarballs.pm 2012-04-05 08:25:15.000000000 +0000 @@ -2,7 +2,7 @@ # # The complete name of the package # the path MUST be valid or the package won't be loaded -package FusionInventory::Agent::Backend::OS::Generic::Tarballs; +package FusionInventory::Agent::Task::Inventory::Input::Generic::Tarballs; use strict; # I need to declare $runAfter because of the strict mode use vars qw($runAfter); @@ -17,7 +17,7 @@ # Check if we are on a linux server sub check { $^O =~ /^linux$/ } # uncomment this if you want check for FreeBSD server -# sub check {can_run("pkg_info")} +# sub check {canRun("pkg_info")} # its the main function of the script, it's called during the hardware inventory sub run { diff -Nru fusioninventory-agent-2.1.10/debian/changelog fusioninventory-agent-2.2.0/debian/changelog --- fusioninventory-agent-2.1.10/debian/changelog 2011-09-06 09:40:10.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/changelog 2012-04-15 11:01:14.000000000 +0000 @@ -1,3 +1,54 @@ +fusioninventory-agent (2.2.0-1~precise1~ppa1) precise; urgency=low + + * No-change backport to precise + + -- Micah Gersten Sun, 15 Apr 2012 05:48:00 -0500 + +fusioninventory-agent (2.2.0-1) unstable; urgency=low + + * New upstream release + * Bump Standards-Version + * new build-dep: libtest-mockmodule-perl + * use pciutils pci.ids file + add pciutils-pciids.diff + * disable t/inventory/generic/lspci/controllers.t + http://forge.fusioninventory.org/issues/1548 + + -- Gonéri Le Bouder Sun, 08 Apr 2012 21:20:18 +0200 + +fusioninventory-agent (2.1.9904-1) experimental; urgency=low + + * New upstream beta release + - refresh the debian/rules to pass the location dir parameters + and so drop debian/patches/etc-location.diff + - just comment libcompress-zlib-perl dependency to be able to + turn it back for backport + + -- Gonéri Le Bouder Fri, 13 Jan 2012 10:48:28 +0100 + +fusioninventory-agent (2.1.9902-1) experimental; urgency=low + + * New upstream beta release + + -- Gonéri Le Bouder Fri, 21 Oct 2011 17:51:50 +0200 + +fusioninventory-agent (2.1.9901-2) experimental; urgency=low + + * Restore the B-D, sorry + + -- Gonéri Le Bouder Tue, 20 Sep 2011 12:15:44 +0200 + +fusioninventory-agent (2.1.9901-1) experimental; urgency=low + + * New upstream beta release + * Drop the 2.1.x patches + - add etc-location.diff + * Refresh dependency + - drop nmap suggest, not used anymore + * use a debian/control + + -- Gonéri Le Bouder Thu, 08 Sep 2011 17:30:04 +0200 + fusioninventory-agent (2.1.10-1) unstable; urgency=low * New upstream release diff -Nru fusioninventory-agent-2.1.10/debian/control fusioninventory-agent-2.2.0/debian/control --- fusioninventory-agent-2.1.10/debian/control 2011-09-06 09:32:15.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/control 2012-04-15 11:01:14.000000000 +0000 @@ -2,13 +2,20 @@ Section: net Priority: extra Maintainer: Gonéri Le Bouder -Build-Depends: debhelper (>= 7), libxml-simple-perl, - libnet-ip-perl, libcompress-zlib-perl, libwww-perl, - libnet-ssleay-perl, perl, quilt, +Build-Depends: debhelper (>= 7.0.50~), + libnet-ip-perl, libwww-perl, quilt, + libnet-ssleay-perl, perl, libuniversal-require-perl, libtest-compile-perl, - libhttp-daemon-perl, libtest-exception-perl, - libhttp-server-simple-perl, libhttp-server-simple-authen-perl -Standards-Version: 3.9.2 + libtest-exception-perl, libhttp-server-simple-perl, + libfile-which-perl, libxml-treepp-perl, libyaml-perl, + libipc-run-perl, libhttp-proxy-perl, libtext-template-perl, + libjson-perl, libio-capture-perl, + libtest-simple-perl, libtest-mockmodule-perl, +# libcompress-zlib-perl, +# LWP6 + libhttp-server-simple-authen-perl, libhttp-server-simple-authen-perl, + libhttp-daemon-perl +Standards-Version: 3.9.3 Homepage: http://fusioninventory.org/ Vcs-Browser: http://git.debian.org/?p=users/goneri/fusioninventory-agent.git;a=summary Vcs-Git: git://git.debian.org/users/goneri/fusioninventory-agent.git @@ -16,12 +23,15 @@ Package: fusioninventory-agent Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, - ucf, libxml-simple-perl, - libnet-ip-perl, libcompress-zlib-perl, libwww-perl, libnet-ssleay-perl, + ucf, libnet-ip-perl, libwww-perl, libnet-ssleay-perl, libproc-daemon-perl, dmidecode [amd64 i386 ia64 kfreebsd-amd64 kfreebsd-i386], - libuniversal-require-perl, libproc-pid-file-perl -Recommends: hdparm, libhttp-daemon-perl -Suggests: pciutils, nmap, smartmontools, read-edid + libuniversal-require-perl, libproc-pid-file-perl, hdparm, + libfile-which-perl, libxml-treepp-perl, libyaml-perl, libtext-template-perl, + libjson-perl, pciutils, +# libcompress-zlib-perl, +# LWP 6 + libhttp-daemon-perl, +Suggests: smartmontools, read-edid Description: Hardware and software inventory tool (client) FusionInventory Agent is an application designed to help a network or system administrator to keep track of the hardware and software diff -Nru fusioninventory-agent-2.1.10/debian/fusioninventory-agent.docs fusioninventory-agent-2.2.0/debian/fusioninventory-agent.docs --- fusioninventory-agent-2.1.10/debian/fusioninventory-agent.docs 2011-09-06 09:38:58.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/fusioninventory-agent.docs 2012-04-15 11:01:14.000000000 +0000 @@ -1,3 +1,2 @@ README -README.html -etc/fusioninventory/agent.cfg +etc/agent.cfg diff -Nru fusioninventory-agent-2.1.10/debian/fusioninventory-agent.install fusioninventory-agent-2.2.0/debian/fusioninventory-agent.install --- fusioninventory-agent-2.1.10/debian/fusioninventory-agent.install 2011-09-06 09:38:39.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/fusioninventory-agent.install 2012-04-15 11:01:14.000000000 +0000 @@ -1,2 +1,2 @@ -etc/fusioninventory/agent.cfg etc/fusioninventory +etc/agent.cfg etc/fusioninventory debian/default/fusioninventory-agent etc/default diff -Nru fusioninventory-agent-2.1.10/debian/patches/fix-sharedir fusioninventory-agent-2.2.0/debian/patches/fix-sharedir --- fusioninventory-agent-2.1.10/debian/patches/fix-sharedir 2011-09-06 09:28:24.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/patches/fix-sharedir 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ ---- fusioninventory-agent.orig/lib/FusionInventory/Agent/Config.pm -+++ fusioninventory-agent/lib/FusionInventory/Agent/Config.pm -@@ -100,7 +100,7 @@ - }; - } - } -- -+ $config->{"share-dir"} = "/usr/share/perl5/auto/share/dist/FusionInventory-Agent"; - - return $config; - } diff -Nru fusioninventory-agent-2.1.10/debian/patches/fusioninventory-agent-config-packager-mode fusioninventory-agent-2.2.0/debian/patches/fusioninventory-agent-config-packager-mode --- fusioninventory-agent-2.1.10/debian/patches/fusioninventory-agent-config-packager-mode 2011-09-06 09:28:24.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/patches/fusioninventory-agent-config-packager-mode 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ ---- debian.orig/fusioninventory-agent-config -+++ debian/fusioninventory-agent-config -@@ -9,7 +9,7 @@ - - - # DEB/RPM/... maintainers, turn this to '1' --my $packaged = 0; -+my $packaged = 1; - - my $config; - my @cacert; diff -Nru fusioninventory-agent-2.1.10/debian/patches/pciutils-pciids.diff fusioninventory-agent-2.2.0/debian/patches/pciutils-pciids.diff --- fusioninventory-agent-2.1.10/debian/patches/pciutils-pciids.diff 1970-01-01 00:00:00.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/patches/pciutils-pciids.diff 2012-04-15 11:01:14.000000000 +0000 @@ -0,0 +1,13 @@ +Index: fusioninventory-agent/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Lspci/Controllers.pm +=================================================================== +--- fusioninventory-agent.orig/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Lspci/Controllers.pm 2011-12-06 14:07:35.210214226 +0100 ++++ fusioninventory-agent/lib/FusionInventory/Agent/Task/Inventory/Input/Generic/Lspci/Controllers.pm 2012-04-08 21:56:57.139985804 +0200 +@@ -95,7 +95,7 @@ + my (%params) = @_; + + my $handle = getFileHandle( +- file => "$params{datadir}/pci.ids", ++ file => "/usr/share/misc/pci.ids", + logger => $params{logger} + ); + return unless $handle; diff -Nru fusioninventory-agent-2.1.10/debian/patches/series fusioninventory-agent-2.2.0/debian/patches/series --- fusioninventory-agent-2.1.10/debian/patches/series 2011-09-06 09:34:55.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/patches/series 2012-04-15 11:01:14.000000000 +0000 @@ -1,2 +1 @@ -fusioninventory-agent-config-packager-mode -fix-sharedir +pciutils-pciids.diff diff -Nru fusioninventory-agent-2.1.10/debian/README.source fusioninventory-agent-2.2.0/debian/README.source --- fusioninventory-agent-2.1.10/debian/README.source 1970-01-01 00:00:00.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/README.source 2012-04-15 11:01:14.000000000 +0000 @@ -0,0 +1,58 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To configure quilt to use debian/patches instead of patches, you want +either to export QUILT_PATCHES=debian/patches in your environment +or use this snippet in your ~/.quiltrc: + + for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do + if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then + export QUILT_PATCHES=debian/patches + break + fi + done + +To get the fully patched source after unpacking the source package, cd to +the root level of the source package and run: + + quilt push -a + +The last patch listed in debian/patches/series will become the current +patch. + +To add a new set of changes, first run quilt push -a, and then run: + + quilt new + +where is a descriptive name for the patch, used as the filename in +debian/patches. Then, for every file that will be modified by this patch, +run: + + quilt add + +before editing those files. You must tell quilt with quilt add what files +will be part of the patch before making changes or quilt will not work +properly. After editing the files, run: + + quilt refresh + +to save the results as a patch. + +Alternately, if you already have an external patch and you just want to +add it to the build system, run quilt push -a and then: + + quilt import -P /path/to/patch + quilt push -a + +(add -p 0 to quilt import if needed). as above is the filename to +use in debian/patches. The last quilt push -a will apply the patch to +make sure it works properly. + +To remove an existing patch from the list of patches that will be applied, +run: + + quilt delete + +You may need to run quilt pop -a to unapply patches first before running +this command. diff -Nru fusioninventory-agent-2.1.10/debian/rules fusioninventory-agent-2.2.0/debian/rules --- fusioninventory-agent-2.1.10/debian/rules 2011-09-06 09:28:24.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/rules 2012-04-15 11:01:14.000000000 +0000 @@ -1,3 +1,33 @@ #!/usr/bin/make -f + +BACKPORT = no + %: - dh $@ + dh $@ --with quilt + +override_dh_auto_configure: + perl Makefile.PL PREFIX=/usr SYSCONFDIR=/etc/fusioninventory LOCALSTATEDIR=/var/lib/fusioninventory-agent + +override_dh_auto_install: + dh_auto_install + rm ./debian/fusioninventory-agent/usr/share/fusioninventory/pci.ids + +override_dh_auto_clean: + [ ! -d var ] || rm -r var + [ ! -d blib ] || rm -r blib + [ ! -f fusioninventory-agent.1.html ] || rm fusioninventory-agent.1.html + [ ! -f pod2htmd.tmp ] || rm pod2htmd.tmp + [ ! -f pod2htmi.tmp ] || rm pod2htmi.tmp + [ ! -f Makefile ] || rm Makefile + [ ! -f MYMETA.yml ] || rm MYMETA.yml + [ ! -f MYMETA.json ] || rm MYMETA.json + [ ! -f t/inventory/generic/lspci/controllers.t ] || rm t/inventory/generic/lspci/controllers.t +ifeq ($(BACKPORT),yes) + [ ! -f t/components/client/ocs/response.t ] || rm t/components/client/ocs/response.t + [ ! -f t/components/client/connection.t ] || rm t/components/client/connection.t + [ ! -f t/components/logger.t ] || rm t/components/logger.t + [ ! -f t/xml/response.t ] || rm t/xml/response.t +# HTTP::Server::Simple::Authen is missing + [ ! -f t/components/client/ssl.t ] || rm t/components/client/ssl.t +endif + dh_clean diff -Nru fusioninventory-agent-2.1.10/debian/source/format fusioninventory-agent-2.2.0/debian/source/format --- fusioninventory-agent-2.1.10/debian/source/format 2012-04-15 11:01:14.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/source/format 2012-04-15 11:01:14.000000000 +0000 @@ -1 +1 @@ -3.0 (quilt) +1.0 diff -Nru fusioninventory-agent-2.1.10/debian/tools/gen-ppa.sh fusioninventory-agent-2.2.0/debian/tools/gen-ppa.sh --- fusioninventory-agent-2.1.10/debian/tools/gen-ppa.sh 1970-01-01 00:00:00.000000000 +0000 +++ fusioninventory-agent-2.2.0/debian/tools/gen-ppa.sh 2012-04-15 11:01:14.000000000 +0000 @@ -0,0 +1,13 @@ +#!/bin/sh + +VERSION=`dpkg-parsechangelog | awk '/Version/ {print $2}'` +UBUREV=1 + +echo $VERSION + +for dist in natty maverick lucid hardy; do + git checkout HEAD -- debian/changelog + dch --force-distribution -v $VERSION$dist$UBUREV -D $dist "Backport for $dist" + dpkg-buildpackage -S -D -sa -i.git + dput ppa ../fusioninventory-agent_$VERSION$dist${UBUREV}_source.changes +done diff -Nru fusioninventory-agent-2.1.10/etc/agent.cfg fusioninventory-agent-2.2.0/etc/agent.cfg --- fusioninventory-agent-2.1.10/etc/agent.cfg 1970-01-01 00:00:00.000000000 +0000 +++ fusioninventory-agent-2.2.0/etc/agent.cfg 2012-04-07 16:00:19.000000000 +0000 @@ -0,0 +1,118 @@ +# fusioninventory agent configuration + +# all defined values match default +# all commented values are examples + + +# +# Target definition options +# + +# send tasks results to an OCS server +#server = http://server.domain.com/ocsinventory +# send tasks results to a FusionInventory for GLPI server +#server = http://server.domain.com/glpi/plugins/fusioninventory/ +# write tasks results in a directory +#local = /tmp +# write tasks results on stdout +#stdout = 1 + +# +# Task definition options +# + +# disable software deployment tasks +#no-task = deploy + +# +# Target scheduling options +# + +# maximum initial delay before first target, in seconds +delaytime = 3600 +# maximum delay between each targets, in seconds +wait = +# do not contact the target before next scheduled time +lazy = 0 + +# +# Inventory task specific options +# + +# do not list local printers +# no-category = printer +# allow to scan use home directories +scan-homedirs = 0 +# save the inventory as HTML +html = 0 +# timeout for inventory modules execution +backend-collect-timeout = 180 +# always send data to server +force = 0 +# mark the machine with given tag +tag = +# additional content inventory file +additional-content = + +# +# Package deployment task specific options +# + +# do not use peer to peer to download files +no-p2p = 0 + +# +# Network options +# + +# proxy address, e.g: http://user:pass@proxy:port +proxy = +# user name for server authentication +user = +# password for server authentication +password = +# path to the CA certificates directory +ca-cert-dir = +# path to the CA certificates file +ca-cert-file = +# do not check server SSL certificates +no-ssl-check = 0 + +# +# Web interface options +# + +# do not use web interface +no-httpd = 0 +# network interface to listen to +httpd-ip = +# network port to list to +httpd-port = 62354 +# trust requests without authentication token +httpd-trust = + +# +# Logging options +# + +# Logger backend, either Stderr, File or Syslog (Stderr) +logger = Stderr +# log file +#logfile = /var/log/fusioninventory.log +# maximum log file size +#logfile-maxsize = 0 +# Syslog facility +logfacility = LOG_USER +# Use color in the console +color = 0 + +# +# Execution mode options +# + +# run as daemon +daemon = 0 +# don't fork in background +no-fork = 0 +# debug mode +debug = 0 diff -Nru fusioninventory-agent-2.1.10/etc/cron.d/fusioninventory-agent fusioninventory-agent-2.2.0/etc/cron.d/fusioninventory-agent --- fusioninventory-agent-2.1.10/etc/cron.d/fusioninventory-agent 2011-09-05 15:07:58.000000000 +0000 +++ fusioninventory-agent-2.2.0/etc/cron.d/fusioninventory-agent 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -# -# File generated by OCS Inventory NG Unified Unix Agent setup -# -################################################################################ -# -# FusionInventory Agent -# -# Copyleft 2007 Didier LIROULET -# Copyleft 2010 FusionInventory -# Web: http://www.FusionInventory.org -# -# This code is open source and may be copied and modified as long as the source -# code is always made freely available. -# Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt -################################################################################ -# -# Launch the agent every day under root account, at HH:MM -# -MM HH * * * root /usr/bin/fusioninventory-agent > /dev/null 2>&1 - diff -Nru fusioninventory-agent-2.1.10/etc/default/fusioninventory-agent fusioninventory-agent-2.2.0/etc/default/fusioninventory-agent --- fusioninventory-agent-2.1.10/etc/default/fusioninventory-agent 2011-09-05 15:07:58.000000000 +0000 +++ fusioninventory-agent-2.2.0/etc/default/fusioninventory-agent 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -SERVER="localhost" diff -Nru fusioninventory-agent-2.1.10/etc/fusioninventory/agent.cfg fusioninventory-agent-2.2.0/etc/fusioninventory/agent.cfg --- fusioninventory-agent-2.1.10/etc/fusioninventory/agent.cfg 2011-09-05 15:07:58.000000000 +0000 +++ fusioninventory-agent-2.2.0/etc/fusioninventory/agent.cfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,105 +0,0 @@ -# OCS Inventory server -# server=http://yourserver/ocsinventory -# FusionInventory for GLPI -#server=http://ipduserveur/glpi/plugins/fusioninventory/front/plugin_fusioninventory.communication.php -# FusionInventory for GLPI with AD auth -#server=http://DOMAINEAD\utilisateur:motdepasse@ipduserveur/glpi/plugins/fusioninventory/front/plugin_fusioninventory.communication.php -# OCS Inventory server with SSL -# server=https://yourserver/ocsinventory -server= - -# Store inventory in a local directory -local=/tmp - -# Agent's logfile -logfile=/var/log/fusioninventory.log - -# Max log file size. Useful if the system has no log -# rotation mechanism -logfile-maxsize=0 - -# Time in second before the first agent execution -delaytime=30 - -# Debug mode (0) -debug=0 -# Save in HTML the inventory requested by --local (0) -html=0 - -# Network options -# proxy address. e.g: http://user:pass@proxy:port () -proxy= -# realm for server HTTP auth. e.g: 'Restricted Area' () -realm= -# user name to use for server auth -user= -# password for server auth -password= - -# SSL certificat directory () -ca-cert-dir= -# SSL certificat file () -ca-cert-file= - -#Disable options: -# Do not deploy packages or run command (0) -no-ocsdeploy=0 -# Do not generate inventory (0) -no-inventory=0 -# Do not return printer list in inventory 0) -no-printer=0 -# Don't allow remote connexion (0) -no-socket=0 -# Do not return installed software list (0) -no-software=0 -# Do not check the SSL connexion with the server (0) -no-ssl-check=0 -# Do not use wakeonlan function (0) -no-wakeonlan=0 -# Do not use snmpquery function (0) -no-snmpquery=0 -#Do not use netdiscovery function (0) -no-netdiscovery=0 - -#Extra options: -# Set a max delay time of one inventory data collect job (180) -backend-collect-timeout=180 -# Indicate the directory where should the agent store its files -#basevardir=/var/lib/fusioninventory-agent -# Use color in the console (0) -color=0 -# Detach the agent in background (0) -daemon=0 -# Daemon but don't fork in background (0) -daemon-no-fork=0 -# Set a max delay time (in second) if no PROLOG_FREQ is set (3600) -delaytime=3600 -# Search for Backend mod in ./lib only (0) -devlib=0 -# Do not load Perl lib from PERL5LIB and PERLIB environment variable (0) -disable-perllib-envvar=0 -# Always send data to server (Don't ask before) (0) -force=0 -# Verbose mode (1) -info=1 -# Do not contact the server more than one time during the PROLOG_FREQ (0) -lazy=0 -# Logger you want to use, can be Stderr,File or Syslog (Stderr) -logger=Stderr -# Ip of the interface to use for peer to peer exchange, default ALL -rpc-ip= -# Port of the RPC, default 62354 -rpc-port= -# Allow local users to http://127.0.0.1:62354/now to force an inventory -rpc-trust-localhost=0 -# Permit to scan home user directories (0) -scan-homedirs=0 -# Path to the directory where are stored the shared files (./share) -share-dir=./share -# Do not write or post the inventory but print it on STDOUT -stdout=0 -# Use TAG as tag () Will be ignored by server if a value already exists -tag= -# Wait during a random periode between 0 and DURATION seconds before contacting server () -wait= - diff -Nru fusioninventory-agent-2.1.10/etc/fusioninventory/softwares/example.sh fusioninventory-agent-2.2.0/etc/fusioninventory/softwares/example.sh --- fusioninventory-agent-2.1.10/etc/fusioninventory/softwares/example.sh 2011-09-05 15:07:58.000000000 +0000 +++ fusioninventory-agent-2.2.0/etc/fusioninventory/softwares/example.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#! /bin/bash -# This is an example script for the byHand software collect method -# -# You can create your own script to detect the installed software -# and install them in /etc/ocsinventory/softwares -# -#ligne=$(ls --version| head -n 1) -# -#soft=$(echo $ligne | cut -f1 -d'('| sed 's/ //') -#vendor=$(echo $ligne | cut -f2 -d'('| cut -f1 -d')') -#version=$(echo $ligne | cut -f2 -d'('| cut -f2 -d')'|sed 's/ //') -# -#echo "$vendor#$soft#$version#simple test" -# -# diff -Nru fusioninventory-agent-2.1.10/etc/init.d/fusioninventory-agent fusioninventory-agent-2.2.0/etc/init.d/fusioninventory-agent --- fusioninventory-agent-2.1.10/etc/init.d/fusioninventory-agent 2011-09-05 15:07:58.000000000 +0000 +++ fusioninventory-agent-2.2.0/etc/init.d/fusioninventory-agent 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: fusioninventory-agent -# Required-Start: $local_fs $remote_fs -# Required-Stop: $local_fs $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: FusionInventory Agent -# Description: This script launch FusionInventory Agent as daemon -### END INIT INFO - -# Author: Gonéri Le Bouder -# - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="FusionInventory Agent" -NAME=fusioninventory-agent -DAEMON=/usr/sbin/$NAME -PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME -DAEMON_ARGS="-d -s $SERVER" - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $DAEMON_ARGS \ - || return 2 - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Wait for children to finish too if this is a daemon that forks - # and if the daemon is only ever run from this initscript. - # If the above conditions are not satisfied then add some other code - # that waits for the process to drop all resources that could be - # needed by services started subsequently. A last resort is to - # sleep for some time. - start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - [ "$?" = 2 ] && return 2 - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff -Nru fusioninventory-agent-2.1.10/etc/logrotate.d/fusioninventory-agent fusioninventory-agent-2.2.0/etc/logrotate.d/fusioninventory-agent --- fusioninventory-agent-2.1.10/etc/logrotate.d/fusioninventory-agent 2011-09-05 15:07:58.000000000 +0000 +++ fusioninventory-agent-2.2.0/etc/logrotate.d/fusioninventory-agent 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -# -# File generated by OCS Inventory NG Unified Unix Agent setup -# -################################################################################ -# -# OCS Inventory NG Unified Unix Agent -# -# Copyleft 2007 Didier LIROULET -# Web: http://www.ocsinventory-ng.org -# -# This code is open source and may be copied and modified as long as the source -# code is always made freely available. -# Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt -################################################################################ -# -# Rotate OCS Inventory NG agent logs daily, only if not empty -# Save 7 days old logs under compressed mode -PATH_TO_LOG_DIRECTORY/*.log { - daily - rotate 7 - compress - notifempty - missingok -} diff -Nru fusioninventory-agent-2.1.10/fusioninventory-agent fusioninventory-agent-2.2.0/fusioninventory-agent --- fusioninventory-agent-2.1.10/fusioninventory-agent 2011-09-06 07:53:10.000000000 +0000 +++ fusioninventory-agent-2.2.0/fusioninventory-agent 2012-04-07 16:00:19.000000000 +0000 @@ -1,54 +1,121 @@ #!/usr/bin/perl -# In order to be able to relocate the librairie location we can't -# load them with 'use' here. - -my $devlib; -foreach (@ARGV) { - if (/^--devlib$/) { - print STDERR "[info] --devlib are found, Developer mode enabled\n"; - unshift @INC, 'lib'; - } elsif (/^--disable-perllib-envvar$/) { - $ENV{PERL5LIB}=undef; - $ENV{PERLLIB}=undef; - } +use strict; +use warnings; +use lib './lib'; + +use English qw(-no_match_vars); +use Getopt::Long; +use Pod::Usage; + +use FusionInventory::Agent; + +Getopt::Long::Configure( "no_ignorecase" ); + +my $options = {}; + +GetOptions( + $options, + 'additional-content=s', + 'backend-collect-timeout=s', + 'ca-cert-dir=s', + 'ca-cert-file=s', + 'conf-file=s', + 'config=s', + 'color', + 'daemon|d', + 'no-fork', + 'debug+', + 'delaytime=s', + 'force|f', + 'help|h', + 'html', + 'lazy', + 'list-tasks', + 'setup', + 'local|l=s', + 'logger=s', + 'logfile=s', + 'logfile-maxsize=i', + 'no-category=s', + 'no-httpd', + 'no-ssl-check', + 'no-task=s', + 'no-p2p', + 'password|p=s', + 'proxy|P=s', + 'httpd-ip=s', + 'httpd-port=s', + 'httpd-trust=s', + 'scan-homedirs', + 'server|s=s', + 'stdout', + 'tag|t=s', + 'user|u=s', + 'version', + 'wait|w=s', + # deprecated options + 'daemon-no-fork|D', + 'devlib', + 'no-ocsdeploy', + 'no-inventory', + 'no-wakeonlan', + 'no-snmpquery', + 'no-netdiscovery', + 'no-printer', + 'no-software', + 'rpc-trust-localhost', + 'rpc-port', + 'rpc-ip', + 'no-socket', + 'realm', + 'info|i', +) or pod2usage(-verbose => 0); + +pod2usage(-verbose => 0) if $options->{help}; + +if ($options->{version}) { + print $FusionInventory::Agent::VERSION_STRING . "\n"; + exit 0; } -if ($ENV{REALLIB}) { - @INC = split(/:/,$ENV{REALLIB}); +my %setup = ( + confdir => './etc', + datadir => './share', + libdir => './lib', + vardir => './var', +); + +if ($options->{setup}) { + foreach my $key (keys %setup) { + print "$key: $setup{$key}\n"; + } + exit 0; } +my $agent = FusionInventory::Agent->new(%setup); -eval 'use English qw(-no_match_vars); 1;'; - -if ($OSNAME =~ /MSWin/ && $EXECUTABLE_NAME =~ /(^.*(\\|\/))/) { - eval 'use Configs; 1'; - $ENV{PATH} .= $Config::Config{path_sep}.$1; -} -eval { - require FusionInventory::Agent; -}; -if ($EVAL_ERROR) { - print STDERR "Failed to load FusionInventory::Agent, $EVAL_ERROR\n"; - print STDERR "you can run the agent directly from its source directory "; - print STDERR "with --devlib\n"; - exit 1; +if ($options->{'list-tasks'}) { + my %tasks = $agent->getAvailableTasks(); + foreach my $task (keys %tasks) { + print "$task (v$tasks{$task})\n"; + } + exit 0; } eval { - my $agent = new FusionInventory::Agent; - $agent->main(); + $agent->init(options => $options); + $agent->run(); }; if ($EVAL_ERROR) { - print STDERR "Execution failed. Are you sure the software is fully "; - print STDERR "installed\n"; - print STDERR "and an old version of the agent not already present on the "; - print STDERR "system?\n"; - print STDERR "___\n"; + print STDERR "Execution failure:.\n"; print STDERR $EVAL_ERROR; exit 1; } + +exit(0); + __END__ =head1 NAME @@ -57,33 +124,88 @@ =head1 SYNOPSIS -B S<[ ... ]> S<[ I<--server server> | I<--local /tmp> ]>... +B [options] [--server server|--local directory|--sdout] + + Target definition options + -s --server=URI send tasks result to a server + -l --local=DIR write tasks results in a directory + --stdout write tasks result on STDOUT + + Target scheduling options + --delaytime=DURATION maximum initial delay before first target, in seconds (3600) + -w --wait=DURATION maximum delay between each target, in seconds + --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) + + 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) + + 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 + -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 =head1 EXAMPLES % fusioninventory-agent --server localhost - # send an inventory to the OCS server + # execute all available tasks required by a local server % fusioninventory-agent --server http://localhost/ocsinventory2 - # send an inventory over http to a server with a non standard - # virtual directory + # execute all available tasks required by a local server, using a specific + # URI % fusioninventory-agent --server https://localhost/ocsinventory - # send an inventory over https to the OCS server + # execute all available tasks required by a local server, using a secure + # connection + + % fusioninventory-agent --server localhost --user test --password s3cr3t + # execute all available tasks required by a local server, using HTTP + # authentication % fusioninventory-agent --local /tmp - # write an inventory in the /tmp directory + # execute all available tasks and write the result in /tmp directory % fusioninventory-agent --local /tmp --html - # Use the --html parameter to generate a HTML file - - % fusioninventory-agent --server localhost --user=toto --password=pw --realm="Restricted Area" - # send a report to a server protected by a basic authentication - % fusioninventory-agent --lazy - # send an inventory only if a random delay between 0 and PROLOG_FREQ had been run over. - - % fusioninventory-agent --delaytime 60 -d - # If NO PROLOG_FREQ has been preset, pick a time between execution and --delaytime for the agent to contact the server [default is 3600 seconds] + # execute all available tasks and write the result in /tmp directory in + # HTML format =head1 DESCRIPTION @@ -120,95 +242,6 @@ =back -=head1 INSTALLATION - -=head2 PREREQUISITES - -Minimum perl version: 5.8 - -The which command on UNIX/Linux/MacOSX system. - -Additional mandatory perl modules: - -=over - -=item Digest::MD5 - -=item XML::Simple - -=item LWP - -=item Net::IP - -=item UNIVERSAL::require - -=item Mac::SysProfile (MacOs only) - -=back - -Additional optional perl modules: - -=over - -=item Compress::Zlib, for message compression - -=item HTTP::Daemon, for web interface - -=item Net::CUPS (v0.60 minimum), for printers detection - -=item File::ShareDir, for automatic data directory determination - -=item Proc::Daemon, for daemon mode (Unix only) - -=item Proc::PID::File, for daemon mode (Unix only) - -=back - -Additional optional programs: - -=over - -=item nmap or ipdiscover, for network discovery - -=item dmidecode (linux or bsd) for hardware inventory - -=item lspci (linux or bsd) for hardware inventory - -=back - -=head2 PROCEDURE - -Once the archive is unpacked, use these commands: - - perl Makefile.PL - make - make install - -You can also run the agent from the tarball directory. In this case, use -the --devlib flag to load the library from the local directory. - -=head2 SYSTEM-SPECIFIC INFORMATIONS - -=head3 Solaris - -Sun Studio seems to be needed to build the dependency. The generated Makefile -needs gmake to be executed. The default installation will install the binary in -/usr/perl5/5.XXXXX/bin, set you $PATH variable according to that. - -On Solaris/SPARC, you must install sneep and record the Serial Number with -it. -Download it from L - -=head3 Windows - -If you don't want to use the installer for Windows you can follow the -installation process avalaible there: -L - -=head2 POST-INSTALLATION - -Run ./fusioninventory-agent-config for automatic configuration. - =head1 OCS INVENTORY PROTOCOL FusionInventory Agent uses OCS Inventory protocol and is compatible with OCS @@ -236,9 +269,9 @@ PROLOG RESP as parameter. The module can send information directly to the server (inventory, SNMP scan result, etc) -=head2 Windows service or Deamon mode +=head2 Server mode (Windows service or Unix daemon) -In deamon mode, the agent wait during a period between the last PROLOG and +In server mode, the agent wait during a period between the last PROLOG and PROLOG_FREQ. If PROLOG_FREQ is not set, it will use --delaytime value. The default value is 3600. @@ -250,444 +283,305 @@ % fusioninventory-agent -s localhost % fusioninventory-agent --server localhost -=over 4 - -=item B<--backend-collect-timeout=SECONDS_BEFORE_KILL> +=head2 Target definition options -Time before the agent kills modules processing which don't end before the -timeout. - -=item B<--basevardir>=I - -Indicate the place where the agent should store its files. - -=item B<--color> - -Display color on the terminal. This feature is disabled on Windows. +=over -=item B<-d>, B<--daemon> -Launch fusioninventory-agent as daemon in background. Proc::Daemon is needed. +=item B<-s>, B<--server>=I -=item B<-D>, B<--daemon-no-fork> +Send results of tasks execution to given server. -Launch fusioninventory-agent in daemon but do fork in background. +If I doesn't start with http:// or https://, the agent assume the +parameter is a hostname and rewrite it as: -=item B<--ca-cert-dir>=I + % --server=http://servername/ocsinventory -The directory where public SSL certificates are stored. In general it's -/etc/ssl/certs. +In general, OCS Inventory server URL have this format: -You don't need to copy a public certificate on very agent if your private -key is valide and was been signed by a valide certificate authority. + http://servername/ocsinventory -=item B<--ca-cert-file>=I +and FusionInventory for GLPI this one: -The path to the public certificate (e.g: /etc/ssl/certs/cacert.pem). If ---ca-cert-file is used, --ca-cert-dir is ignored. + http://servername/glpi/plugins/fusioninventory/front/plugin_fusioninventory.communication.php -You don't need to copy a public certificate on very agent if your private -key is valide and was been signed by a valide certificate authority. +Multiple values can be specified, using comma as a separator. -=item B<--conf-file>=I +=item B<-l>, B<--local>=I -Load the configuration file from the given location. Ignored on Windows. +Write the results of tasks execution to given directory. -On Windows the settings are loaded from the registry. The information are -stored there: -HKEY_LOCAL_MACHINE\SOFTWARE\FusionInventory-Agent +=item B<--stdout> -Or on Windows 64bit machine: -HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\FusionInventory-Agent +Write the results of tasks execution on stdout. -=item B<--debug> +=back -Turn the debug mode on. +=head2 Target scheduling options -=item B<--devlib> +=over -This option is designed for the developer. With it enabled, -fusioninventory-agent won't try to load the Backend module installed -on the system. Instead it will scan the ./lib directory. -It may also be useful if you don't want to install the agent on -your system. +=item B<--delaytime>=I -This option can only be used as command line argument. It will be -ignored if you set it in a config file or in Windows registry. +Set an initial delay before the first target, whose value is computed randomly +between LIMIT / 2 and LIMIT seconds. This setting is ignored for server targets +after the initial contact, in favor of server-specified parameter +(PROLOG_FREQ). -=item B<--delaytime=SECONDS_TO_WAIT> +=item B<-w> I, B<--wait>=I -This option defaults to waiting a random() time between 0 and 3600 before -initially contacting the server assuming NO PROLOG_FREQ has been set. -Once PROLOG_FREQ has been set, it uses that number at the top end of -it's random setting. Useful for pre-setting a deployed agent's initial -start time (so you don't jam the server all at once, but don't have to -wait an hour to make sure the deployment worked). +Set a delay between each targets, whose value is computed randomly between 0 +and LIMIT seconds. -=item B<--disable-perllib-envvar> +=item B<--lazy> -Do not use PERL5LIB and PERLLIB environment variable to find Perl library -path. +Do not contact the target before next scheduled time. -This option can only be used as command line argument. It will be -ignored if you set it in a config file or in Windows registry. +This option is only available when the agent is not run as a server. -=item B<-f>, B<--force> +=back -The agent ask first the server if it should send an inventoroy of the -machine. If the server doesn't know the machine or has outdated -informations, it will request it. -With this option, the agent ignore the server anwser and send an inventory. +=head2 Task selection options -=item B<--html> +=over -Save the local inventory requested by B<--local> in HTML. +=item B<--no-task>=I -=item B<-i>, B<--info> +Disable the given task -Turn the verbose mode on. The flag is ignored if B<--debug> is enable. +=item B<--list-tasks> -=item B<--lazy> +List available tasks and exit -Do not contact the server more than one time during the PROLOG_FREQ and do -an exit if there is nothing to do. Useful if you want to start the agent -script regulary from the crontab but don't want to overload the server. +=back -=item B<-l>, B<--local>=I +=head2 Inventory task specific options -Write an inventory in the I directory. A new file will be created if needed. +=over -=item B<--logfile>=I +=item B<--no-category>=I -Log message in I and turn off STDERR +Do not list given category items in inventory. -=item B<--logfile-maxsize>=I +=item B<--scan-homedirs> -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. +Allow the agent to scan home directories for virtual machines. -=item B<--logger>=I +=item B<--html> -The logger you want to use. It can be: +Save the inventory as HTML. -=over 4 +This is only used for local inventories. -=item +=item B<-f>, B<--force> -Stderr: print the messages directly in the console. Messages are lost in -daemon mode (B<--daemon>). You can use B<--color> to turn color mode on. +Send an inventory to the server, even if this last one doesn't ask for it. -=item +=item B<--tag>=I -File: log the error in a log file. Please use B<--logfile> to set the -location of your log file. B<--logfile> turns this option on automatically +Mark the machine with given tag. -=item +=item B<--backend-collect-timeout>=I