From 8684545c4ef3bd71384f8b243bed622cd08fdf54 Mon Sep 17 00:00:00 2001 From: ramonn Date: Wed, 20 Jun 2012 13:42:17 +0000 Subject: [PATCH] 2012-06-20 Ramon Novoa * pandora_update_version.sh: Update version in agent configuration files. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6622 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- extras/ChangeLog | 5 +++++ extras/pandora_update_version.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/extras/ChangeLog b/extras/ChangeLog index 787b7d2a59..9c66a64bd4 100644 --- a/extras/ChangeLog +++ b/extras/ChangeLog @@ -1,3 +1,8 @@ +2012-06-20 Ramon Novoa + + * pandora_update_version.sh: Update version in agent configuration + files. + 2012-06-11 Ramon Novoa * pandora_update_version.sh: Update version string in server diff --git a/extras/pandora_update_version.sh b/extras/pandora_update_version.sh index 04cfbd4e57..d811eddb95 100755 --- a/extras/pandora_update_version.sh +++ b/extras/pandora_update_version.sh @@ -43,6 +43,7 @@ SERVER_CONF_FILE="$CODEHOME/pandora_server/conf/pandora_server.conf" CONSOLE_DB_FILE="$CODEHOME/pandora_console/pandoradb_data.sql" CONSOLE_FILE="$CODEHOME/pandora_console/include/config_process.php" CONSOLE_INSTALL_FILE="$CODEHOME/pandora_console/install.php" +AGENT_BASE_DIR="$CODEHOME/pandora_agents/" AGENT_UNIX_FILE="$CODEHOME/pandora_agents/unix/pandora_agent" AGENT_WIN_FILE="$CODEHOME/pandora_agents/win32/pandora.cc" AGENT_WIN_MPI_FILE="$CODEHOME/pandora_agents/win32/installer/pandora.mpi" @@ -124,6 +125,10 @@ else sed -n "1h;1!H;\${;g;s/[\r\n]Windows\,Executable[\r\n]{[^\n\r]*}/\nWindows\,Executable\n{\<\%AppName\%\>\-Setup\<\%Ext\%\>}/g;p;}" "$AGENT_WIN_MPI_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$AGENT_WIN_MPI_FILE" fi sed -e "s/\s*VALUE \"ProductVersion\".*/ VALUE \"ProductVersion\", \"($VERSION(Build $BUILD))\"/" "$AGENT_WIN_RC_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$AGENT_WIN_RC_FILE" +echo "Updating Agent configuration files..." +for conf in `find $AGENT_BASE_DIR -name pandora_agent.conf`; do + sed -e "s/#\s*[Vv]ersion\s*[^\,]*/# Version $VERSION/" "$conf" > "$TEMP_FILE" && mv "$TEMP_FILE" "$conf" +done rm -f "$TEMP_FILE"