From 3b5c59a73155fc0f4dd0513f79c470384a5621b3 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 2 Aug 2007 17:25:59 +0000 Subject: [PATCH] 2007-08-02 Sancho Lerena * lib: Linked to bin/PandoraFMS, for use in Makefile.PL * Makefile.PL: Perl standard interface for make (to install) * bin/pandora_db.pl: Some small fixes and information strings updated. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@584 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 8 ++++++++ pandora_server/Makefile.PL | 27 +++++++++++++++++++++++++ pandora_server/bin/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS | 1 + pandora_server/util/pandora_db.pl | 12 +++++++---- 5 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 pandora_server/Makefile.PL create mode 120000 pandora_server/lib/PandoraFMS diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index cdf2b17cad..f831c07d2e 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,11 @@ +2007-08-02 Sancho Lerena + + * lib: Linked to bin/PandoraFMS, for use in Makefile.PL + + * Makefile.PL: Perl standard interface for make (to install) + + * bin/pandora_db.pl: Some small fixes and information strings updated. + 2007-07-31 Sancho Lerena * util/snmptrapd: Deleted binary. diff --git a/pandora_server/Makefile.PL b/pandora_server/Makefile.PL new file mode 100644 index 0000000000..dde9b43b3f --- /dev/null +++ b/pandora_server/Makefile.PL @@ -0,0 +1,27 @@ +use 5.000; +use ExtUtils::MakeMaker; + +WriteMakefile( + NAME => 'PandoraFMS', + VERSION_FROM => 'bin/PandoraFMS/Config.pm', + AUTHOR => 'Sancho Lerena ', + PREREQ_PM => { + DBI => 0, + threads::shared => 0, + IO::Socket => 0, + Time::Format => 0, + Time::Local => 0, + Date::Manip => 0, + XML::Simple => 0, + Net::Ping => 0, + Time::HiRes => 0, + IO::Socket => 0, + SNMP => 0 + }, + EXE_FILES => +[ 'bin/pandora_server.pl', 'bin/pandora_network.pl', 'bin/pandora_recon.pl', 'bin/pandora_snmpconsole.pl'], + PMLIBDIRS => [ 'lib' ], + 'dist' => { 'TAR' => 'tar', 'TARFLAGS' => 'cvfz', 'SUFFIX' +=> '.gz', 'COMPRESS' => 'gzip'} +); + diff --git a/pandora_server/bin/PandoraFMS/Config.pm b/pandora_server/bin/PandoraFMS/Config.pm index f1e84c1487..1924859f0e 100755 --- a/pandora_server/bin/PandoraFMS/Config.pm +++ b/pandora_server/bin/PandoraFMS/Config.pm @@ -36,7 +36,7 @@ our @EXPORT = qw( pandora_help_screen # version: Defines actual version of Pandora Server for this module only my $pandora_version = "1.3-dev"; my $pandora_build="PS070731"; -our $VERSION = $pandora_version; +our $VERSION = $pandora_version." ".$pandora_build; # Setup hash my %pa_config; diff --git a/pandora_server/lib/PandoraFMS b/pandora_server/lib/PandoraFMS new file mode 120000 index 0000000000..fde1b9ac41 --- /dev/null +++ b/pandora_server/lib/PandoraFMS @@ -0,0 +1 @@ +../bin/PandoraFMS/ \ No newline at end of file diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 549051280b..480b8edcf9 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -32,7 +32,7 @@ my $dirname=""; my $dbname = 'pandora'; my $dbhost =''; my $dbuser =''; -my $verbosity =''; +my $verbosity =0; my $dbpass=''; my $server_threshold=''; my $log_file=""; @@ -249,8 +249,9 @@ sub pandora_compactdb { ############################################################################## sub pandora_init { - printf "\nPandora DB $version, \n"; - printf "This program is GPL Licensed, please use it freely\n"; + print "\nPandora FMS DB Tool $version Copyright (c) 2004-2007 ArticaST\n"; + print "This program is Free Software, licensed under the terms of GPL License v2\n"; + print "You can download latest versions and documentation at http://pandora.sourceforge.net\n"; # Load config file from command line if ($#ARGV == -1 ){ @@ -268,6 +269,7 @@ sub pandora_init { elsif ($parametro =~ m/--help\z/i ) { help_screen(); } elsif ($parametro =~ m/-v\z/i) { $verbosity=5; } elsif ($parametro =~ m/-d\z/i) { $verbosity=10; } + elsif ($parametro =~ m/-d\z/i) { $verbosity=0; } else { ($pandora_path = $parametro); } } if ($pandora_path eq ""){ @@ -323,7 +325,6 @@ sub pandora_loadconfig { elsif ($parametro =~ m/dbname\z/) { $dbname = $args[$ax+1]; $ax++; } elsif ($parametro =~ m/dbhost\z/) { $dbhost = $args[$ax+1]; $ax++; } elsif ($parametro =~ m/log_file\z/) { $log_file = $args[$ax+1]; $ax++; } - elsif ($parametro =~ m/verbosity\z/) { $verbosity = $args[$ax+1]; $ax++; } elsif ($parametro =~ m/server_threshold\z/) { $server_threshold = $args[$ax+1]; $ax++; } } @@ -387,6 +388,9 @@ sub pandora_loadconfig { sub help_screen{ printf "\n\nSintax: \n pandora_db.pl fullpathname_to_pandora_server.conf \n\n"; + print " -d Debug output (very verbose) \n"; + print " -v Verbose output \n"; + print " -q Quiet output \n"; exit; }