From 277f76c0ac0b75cfb37f7506975b1f8ce0923d66 Mon Sep 17 00:00:00 2001 From: jsatoh Date: Sun, 27 Apr 2014 04:16:31 +0000 Subject: [PATCH] 2014-04-27 Junichi Satoh * util/recon_scripts/snmp-recon.pl: Added support for FreeBSD. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9823 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 4 +++ .../util/recon_scripts/snmp-recon.pl | 30 ++++++++++++++----- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 9b3eb339c9..75cb3de272 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,7 @@ +2014-04-27 Junichi Satoh + + * util/recon_scripts/snmp-recon.pl: Added support for FreeBSD. + 2014-04-27 Junichi Satoh * lib/PandoraFMS/PluginServer.pm: Fixed plugin execution failure diff --git a/pandora_server/util/recon_scripts/snmp-recon.pl b/pandora_server/util/recon_scripts/snmp-recon.pl index 09a3e47aa6..0274172075 100755 --- a/pandora_server/util/recon_scripts/snmp-recon.pl +++ b/pandora_server/util/recon_scripts/snmp-recon.pl @@ -28,14 +28,28 @@ my $ALLIFACES = ''; my %ARP_CACHE; # Default configuration values. -my %CONF = ( - 'nmap' => '/usr/bin/nmap', - 'pandora_path' => '/etc/pandora/pandora_server.conf', - 'ping_retries' => 1, - 'ping_timeout' => 2, - 'PID' => '', - 'quiet' => 1, -); +my $OSNAME = $^O; +my %CONF; + +if ($OSNAME eq "freebsd") { + %CONF = ( + 'nmap' => '/usr/local/bin/nmap', + 'pandora_path' => '/usr/local/etc/pandora/pandora_server.conf', + 'ping_retries' => 1, + 'ping_timeout' => 2, + 'PID' => '', + 'quiet' => 1, + ); +} else { + %CONF = ( + 'nmap' => '/usr/bin/nmap', + 'pandora_path' => '/etc/pandora/pandora_server.conf', + 'ping_retries' => 1, + 'ping_timeout' => 2, + 'PID' => '', + 'quiet' => 1, + ); +} # Connections between devices. my %CONNECTIONS;