Unify the format of product version messages.
This commit is contained in:
parent
847b567f5c
commit
6939ec4d44
|
@ -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"
|
||||
|
|
|
@ -1229,7 +1229,8 @@ use constant MAX_LOOP_COUNTER => 1000000000;
|
|||
# Print usage information and exit.
|
||||
################################################################################
|
||||
sub print_usage () {
|
||||
print "\nUsage: $0 <Pandora home>\n\n";
|
||||
print "Pandora FMS Agent for Linux v" . AGENT_VERSION . " Build " . AGENT_BUILD . "\n\n";
|
||||
print "Usage: $0 <Pandora home>\n\n";
|
||||
print "\tPandora home is the directory where pandora_agent.conf is located,\n";
|
||||
print "\tby default /etc/pandora.\n\n";
|
||||
exit 1;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue