From c637d5e73b67867e00f7a61c8d93a44f1100f285 Mon Sep 17 00:00:00 2001 From: ramonn Date: Thu, 20 May 2010 13:09:50 +0000 Subject: [PATCH] 2010-05-20 Ramon Novoa * unix/pandora_agent_installer, unix/DEBIAN/control, unix/DEBIAN/make_deb_package.sh, unix/pandora_agent.spec, unix/pandora_agent, linux/DEBIAN/make_deb_package.sh, linux/pandora_agent.spec: Updated for the release of Pandora FMS 3.1 RC1. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2772 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/ChangeLog | 7 +++++++ pandora_agents/linux/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/linux/pandora_agent.spec | 4 ++-- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 6 +++--- pandora_agents/unix/pandora_agent | 5 +++-- pandora_agents/unix/pandora_agent.spec | 6 +++--- pandora_agents/unix/pandora_agent_installer | 2 +- 8 files changed, 21 insertions(+), 13 deletions(-) diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index 13f667156d..31b733a50d 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,10 @@ +2010-05-20 Ramon Novoa + + * unix/pandora_agent_installer, unix/DEBIAN/control, + unix/DEBIAN/make_deb_package.sh, unix/pandora_agent.spec, + unix/pandora_agent, linux/DEBIAN/make_deb_package.sh, + linux/pandora_agent.spec: Updated for the release of Pandora FMS 3.1 RC1. + 2010-05-20 Miguel de Dios * DEBIAN/make_deb_package.sh: fixed the permissions to DEBIAN temp package. diff --git a/pandora_agents/linux/DEBIAN/make_deb_package.sh b/pandora_agents/linux/DEBIAN/make_deb_package.sh index 5eda6888bc..7916c2641e 100644 --- a/pandora_agents/linux/DEBIAN/make_deb_package.sh +++ b/pandora_agents/linux/DEBIAN/make_deb_package.sh @@ -38,7 +38,7 @@ mkdir -p temp_package/usr/bin echo "Make directory system tree for package." cp DEBIAN temp_package -R -chmod 777 -R temp_package/DEBIAN +chmod 755 -R temp_package/DEBIAN PANDORA_LOG=temp_package/var/log/pandora/pandora_agent.log PANDORA_BIN=temp_package/usr/bin/pandora_agent diff --git a/pandora_agents/linux/pandora_agent.spec b/pandora_agents/linux/pandora_agent.spec index c2fb36d685..6ee2c4fe0f 100755 --- a/pandora_agents/linux/pandora_agent.spec +++ b/pandora_agents/linux/pandora_agent.spec @@ -2,11 +2,11 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent -%define version 3.0.0 +%define version 3.1rc1 Summary: Pandora FMS Linux agent Name: %{name} Version: %{version} -Release: 4 +Release: 1 License: GPL Vendor: ArticaST Source0: %{name}-%{version}.tar.gz diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c3f1a2bc31..499d6a49a7 100755 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: PandoraFMS-Agent -Version: 3.1.0 +Version: 3.1rc1 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 5eda6888bc..4578a61298 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_agent_version="3.1.0" +pandora_version="3.1rc1" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null @@ -38,7 +38,7 @@ mkdir -p temp_package/usr/bin echo "Make directory system tree for package." cp DEBIAN temp_package -R -chmod 777 -R temp_package/DEBIAN +chmod 755 -R temp_package/DEBIAN PANDORA_LOG=temp_package/var/log/pandora/pandora_agent.log PANDORA_BIN=temp_package/usr/bin/pandora_agent @@ -119,7 +119,7 @@ echo "END" echo "Make the package \"Pandorafms console\"." dpkg-deb --build temp_package -mv temp_package.deb pandorafms.agent_$pandora_agent_version.deb +mv temp_package.deb pandorafms.agent_$pandora_version.deb echo "Delete the \"temp_package\" temp dir for job." rm -rf temp_package diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index de89c15611..fd81bf27ff 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -36,6 +36,7 @@ use constant AGENT_BUILD => '100222'; use constant TOTALMEMORY_CMDS => { # command linux => ['cat /proc/meminfo | grep MemTotal: | awk \'{ print $2 }\''], + solaris => ['MEM=`prtconf | grep Memory | awk \'{print $3}\'` bash -c \'echo $(( 1024 * $MEM ))\''], hpux => ['swapinfo -t | grep memory | awk \'{print $2}\''] }; @@ -59,7 +60,7 @@ use constant CPUUSAGE_CMDS => { use constant PROC_CMDS => { # command, command name index, cpu usage index, memory usage index linux => ['ps aux', 10, 2, 5], - solaris => ['prstat 1 1 | awk -F/ \'{print $1}\' | sed \'s/% / /g\' | sed \'s/K / /g\'', 9, 8, 2], + solaris => ['prstat 1 1 | awk -F/ \'{print $1}\' | sed \'s/% / /g\' | sed \'s/K / /g\'', 10, 9, 3], hpux => ['ps -elf', 15, -1, 9], aix => ['ps aux', 10, 2, 5], }; @@ -70,7 +71,7 @@ use constant PART_CMDS => { linux => ['df', 5, 1, 3], solaris => ['df -k', 5, 1, 3], hpux => ['df -P', 5, 1, 3], - aix => ['df -k', 6, 1, 2] + aix => ['df -kP', 5, 1, 3] }; # OS and OS version diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 954c9a6158..a21b006b52 100755 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,11 +2,11 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 3.0.0 +%define version 3.1rc1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} Version: %{version} -Release: 2 +Release: 1 License: GPL Vendor: ArticaST Source0: %{name}-%{version}.tar.gz @@ -43,7 +43,7 @@ mkdir -p $RPM_BUILD_ROOT/var/log/pandora/ cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/ -cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent_daemon $RPM_BUILD_ROOT/etc/init.d/pandora_agent_daemon +cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/init.d/pandora_agent_daemon # Checking old config file (if exists) if [ -f /etc/pandora/pandora_agent.conf ] ; then diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 652ba51d2d..0d5560d86b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -188,7 +188,7 @@ install () { chmod 755 $PANDORA_BASE$TENTACLE echo "Installing Tentacle Client manual" - if [ -e ../man/man1/tentacle_client.1.gz ] + if [ -f ../man/man1/tentacle_client.1.gz ] then cp ../man/man1/tentacle_client.1.gz $PANDORA_BASE/usr/share/man/man1 else