diff --git a/extras/pandora_update_version.sh b/extras/pandora_update_version.sh index 23ea7a4627..71d29feb10 100755 --- a/extras/pandora_update_version.sh +++ b/extras/pandora_update_version.sh @@ -160,9 +160,9 @@ echo "Updating Pandora Server version..." sed -i -e "s/my\s\s*\$pandora_version\s*=.*/my \$pandora_version = \"$VERSION\";/" "$SERVER_FILE" sed -i -e "s/my\s\s*\$pandora_build\s*=.*/my \$pandora_build = \"$BUILD\";/" "$SERVER_FILE" echo "Updating DB maintenance script version..." -sed -i -e "s/my\s\s*\$version\s*=.*/my \$version = \"$VERSION PS$BUILD\";/" "$SERVER_DB_FILE" +sed -i -e "s/my\s\s*\$version\s*=.*/my \$version = \"$VERSION Build $BUILD\";/" "$SERVER_DB_FILE" echo "Updating CLI script version..." -sed -i -e "s/my\s\s*\$version\s*=.*/my \$version = \"$VERSION PS$BUILD\";/" "$SERVER_CLI_FILE" +sed -i -e "s/my\s\s*\$version\s*=.*/my \$version = \"$VERSION Build $BUILD\";/" "$SERVER_CLI_FILE" sed -i -e "s/\s*\#\s*\Version.*/\# Version $VERSION/" "$SERVER_CONF_FILE" sed -i -e "s/\s*\!define PRODUCT_VERSION.*/\!define PRODUCT_VERSION \"$VERSION\"/" "$SERVER_WIN_MPI_OPEN_FILE" sed -i -e "s/\s*\!define PRODUCT_VERSION.*/\!define PRODUCT_VERSION \"$VERSION\"/" "$SERVER_WIN_MPI_ENT_FILE" @@ -197,7 +197,7 @@ echo "Updating Pandora Unix Agent version..." sed -i -e "s/\s*use\s*constant\s*AGENT_VERSION =>.*/use constant AGENT_VERSION => '$VERSION';/" "$AGENT_UNIX_FILE" sed -i -e "s/\s*use\s*constant\s*AGENT_BUILD =>.*/use constant AGENT_BUILD => '$BUILD';/" "$AGENT_UNIX_FILE" echo "Updating Pandora Windows Agent version..." -sed -i -e "s/\s*#define\s*PANDORA_VERSION\s*.*/#define PANDORA_VERSION (\"$VERSION(Build $BUILD)\")/" "$AGENT_WIN_FILE" +sed -i -e "s/\s*#define\s*PANDORA_VERSION\s*.*/#define PANDORA_VERSION (\"$VERSION Build $BUILD\")/" "$AGENT_WIN_FILE" sed -i -e "s/{Pandora FMS Windows Agent v.*}/{Pandora FMS Windows Agent v$VERSION}/" "$AGENT_WIN_MPI_FILE" NUMERIC_VERSION=$(echo $VERSION | sed -e "s/\([0-9]*\.[0-9]*\).*/\1/") sed -i -n "1h;1!H;\${;g;s/[\r\n]InstallVersion[\r\n]{\S*}/\nInstallVersion\n{$NUMERIC_VERSION.0.0}/g;p;}" "$AGENT_WIN_MPI_FILE" diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 2702989549..3652392791 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1229,7 +1229,8 @@ use constant MAX_LOOP_COUNTER => 1000000000; # Print usage information and exit. ################################################################################ sub print_usage () { - print "\nUsage: $0 \n\n"; + print "Pandora FMS Agent for Linux v" . AGENT_VERSION . " Build " . AGENT_BUILD . "\n\n"; + print "Usage: $0 \n\n"; print "\tPandora home is the directory where pandora_agent.conf is located,\n"; print "\tby default /etc/pandora.\n\n"; exit 1; diff --git a/pandora_agents/win32/main.cc b/pandora_agents/win32/main.cc index 70f35e66e9..802a4e3a65 100644 --- a/pandora_agents/win32/main.cc +++ b/pandora_agents/win32/main.cc @@ -115,8 +115,8 @@ main (int argc, char *argv[]) { return 0; } else if (_stricmp(argv[i], HELP_CMDLINE_PARAM) == 0) { /* Help parameter */ - cout << "Pandora agent for Windows. "; - cout << "Version " << getPandoraAgentVersion () << endl; + cout << "Pandora agent for Windows "; + cout << "v" << getPandoraAgentVersion () << endl << endl; cout << "Usage: " << argv[0] << " [OPTION]" << endl << endl; cout << "Available options are:" << endl; cout << "\t" << SERVICE_INSTALL_CMDLINE_PARAM; diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 467d3d6a04..c4e4166b6a 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.754(Build 210510)") +#define PANDORA_VERSION ("7.0NG.754 Build 210510") string pandora_path; string pandora_dir; diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 30e7c59d5c..6a76d73323 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -77,7 +77,7 @@ sub help_screen { sub pandora_init { my $pa_config = $_[0]; my $init_string = $_[1]; - print "\n$init_string $pandora_version Build $pandora_build Copyright (c) 2004-20".substr($pandora_build,0,2)." " . pandora_get_initial_copyright_notice() . "\n"; + print "$init_string v$pandora_version Build $pandora_build\n\n"; print "This program is OpenSource, licensed under the terms of GPL License version 2.\n"; print "You can download latest versions and documentation at official web page.\n\n"; diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a1e0360b4f..42fc0c1695 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.754 PS210510"; +my $version = "7.0NG.754 Build 210510"; # Pandora server configuration my %conf; @@ -548,7 +548,7 @@ sub pandora_compactdb ($$$) { sub pandora_init_pdb ($) { my $conf = shift; - log_message ('', "\nDB Tool $version Copyright (c) 2004-2018 " . pandora_get_initial_copyright_notice() . "\n"); + log_message ('', "Pandora FMS DB Tool v$version\n\n"); log_message ('', "This program is Free Software, licensed under the terms of GPL License v2\n"); log_message ('', "You can download latest versions and documentation at official web\n\n");