From 1499e283b0b86cc3bb9ef696f05bcdf3e732ccf5 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Fri, 24 Oct 2014 15:17:29 +0200 Subject: [PATCH] Reduced verbosity to make parsing output easier. --- pandora_server/util/pandora_manage.pl | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index e5872e359e..b7f82a2d24 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -58,10 +58,11 @@ pandora_manage_init(\%conf); pandora_load_config (\%conf); # Load enterprise module +my $enterprise_msg; if (enterprise_load (\%conf) == 0) { - print "[*] Pandora FMS Enterprise module not available.\n\n"; + $enterprise_msg = "[*] Pandora FMS Enterprise module not available."; } else { - print "[*] Pandora FMS Enterprise module loaded.\n\n"; + $enterprise_msg = "[*] Pandora FMS Enterprise module loaded."; } # Connect to the DB @@ -92,6 +93,10 @@ exit; # Print a help screen and exit. ############################################################################## sub help_screen{ + print "\nPandora FMS CLI $version Copyright (c) 2013 Artica ST\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://www.pandorafms.org\n\n"; + print "$enterprise_msg\n\n"; print "Usage: $0 [options] \n\n" unless $param ne ''; print "Available options by category:\n\n" unless $param ne ''; print "Available options for $param:\n\n" unless $param eq ''; @@ -226,10 +231,6 @@ sub pandora_manage_init ($) { $conf->{"quiet"}=0; # Daemon 0 by default - print "\nPandora FMS CLI $version Copyright (c) 2013 Artica ST\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://www.pandorafms.org\n\n"; - # Load config file from command line help_screen () if ($#ARGV < 0); @@ -4002,8 +4003,6 @@ sub pandora_manage_main ($$$) { } } - print "\n[*] Successful execution. Exiting !\n\n"; - exit; }