################################################################################
#
# OCS Inventory NG Agent Setup
#
# Copyleft 2006 Pascal DANEK
# Web: http://ocsinventory.sourceforge.net
#
# 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
################################################################################

How to setup OCS Inventory NG Agent ?

OCS Inventory NG Agent need the following components:
- dmidecode version 2.0 or higher
- PERL 5.6 or higher
- Perl module XML::Simple version 2.12 or higher
- Perl module Compress::Zlib version 1.33 or higher
- Perl module Net::IP version 1.21 or higher
- Perl module LWP (formally known as libwww-perl) version 5.8 or higher
- Perl module Digest::MD5 version 2.33 or higher
- Perl module Net::SSLeay version 1.25 or higher
- ipdiscover version 3 or higher

You must also know the following things:
- Host running OCS Inventory NG Communication Server
- Port of OCS Inventory NG Communication Server

To install agent, just run as root "sh setup.sh" and follow the instructions.
Installer will do the following:
1) Ensure your computer runs every needed components. If there are missing
   components, setup is able to install them (EXCEPT if those components also
   require others components).
2) Build and install ipdiscover binary
3) Build and install Agent's perl module. Agent's perl script
   ocsinventory-client.pl goes in /usr/sbin.
4) Put a link "ocsinv" into "/bin" to allow you to run agent manually.
5) Create "/etc/ocsinventory-client" Agent's configuration directory and ask you
   for configuration parameters.
6) Create directory "/var/log/ocsinventory-client" to allow agent storing logs
   here and add a log rotation directive into /etc/logrotate.d.
6) Add a crontab task into "/etc/cron.d" to run agent every day. 

By default, installer runs in user interactive mode, but you can run script
setup.sh in silent mode (without user interaction) if you provide in command
line the following parameters:
- param 1 must be 1 to enable setup of missing dependancies (dmidecode, perl
  modules), 0 to disable
- param 2 must be ocs server address (local for local inventory method)
- param 3 can be ocs server port (optional, default to 80)
- param 4 can be 1 to enable autoupdate, 0 to disable (optional, enabled by
  default)
- param 5 can be TAG value between quotes (optional)
Example: sh setup.sh 1 communication_server_address communication_server_port 0 "my site"
         sh setup.sh 1 communication_server_address communication_server_port 0
         sh setup.sh 1 local

Installer exit with 0 if no errors, 1 if errors while installing
dependancies, 2 if errors while installing agent

Enjoy OCS Inventory NG ;-)

OCS Inventory Team
