diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index e36027f331..183d5a5c7b 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,23 @@ +2009-11-08 Sancho Lerena + + * util/pandora_checkdep.pl: Deleted old dep checker, not used anymore. + + * pandora_server_upgrade: Several fixes, adding logrotate conf and more + link, permissions and startup scripts stuff fixed. + + * DEBIAN/control: Updated to RC2, deleted old deps not used anymore. + + * DEBIAN/postinst: Simplified some stuff who don't work nice (startup + script links, logrotate missing and pandora user doesn't exist. Also problems + with permissions with tentacle_server. + + * DEBIAN/prerm: Simplified, fixed problems deleting startup links. + + * DEBIAN/conffiles: Was not working and causes pandora_server.conf to do + not exist in target systems. Removing it works nice. + + DEBian packages works 100%, tested on latest Debian Stable from scratch. + 2009-11-07 Sancho Lerena * pandora_server_installer: A few bunch of upgrades for SUSE, added diff --git a/pandora_server/DEBIAN/conffiles b/pandora_server/DEBIAN/conffiles deleted file mode 100755 index 7a4bd226ed..0000000000 --- a/pandora_server/DEBIAN/conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/pandora/pandora_server.conf diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 7c19fa3330..0bc92ed394 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,10 +1,10 @@ package: PandoraFMS-Server -Version: 3.0.0.rc1 +Version: 3.0.0.rc2 Architecture: all Priority: optional Section: admin Installed-Size: 640 Maintainer: Miguel de Dios Homepage: http://pandorafms.org/ -Depends: perl (>= 5.8), libmail-sendmail-perl, libdbi-perl, libdbd-mysql-perl,libtime-format-perl, libnetaddr-ip-perl, libdate-manip-perl, libtime-format-perl, libxml-simple-perl, libnetaddr-ip-perl, libhtml-parser-perl, snmp, snmpd, traceroute, xprobe2, nmap, sudo, logrotate -Description: Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments. +Depends: perl (>= 5.8), libmail-sendmail-perl, libdbi-perl, libdbd-mysql-perl,libtime-format-perl, libnetaddr-ip-perl, libtime-format-perl, libxml-simple-perl, libhtml-parser-perl, snmp, snmpd, traceroute, xprobe2, nmap, sudo +Description: Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments. This is the server package. Server makes the remote checks and process information transfer by Pandora FMS agents to the server. diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 29ed215423..75ac8cc08e 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -1,6 +1,6 @@ #!/bin/bash -#Pandora FMS- http:#pandorafms.com +# Pandora FMS- http://pandorafms.com # ================================================== # Copyright (c) 2005-2009 Artica Soluciones Tecnologicas # Please see http:#pandorafms.org for full contribution list @@ -66,7 +66,6 @@ cp conf/pandora_server.conf temp_package/etc/pandora/ cp util/pandora_server temp_package/etc/init.d/ cp -R util temp_package/usr/share/pandora_server - cp -R DEBIAN temp_package/ echo "Remove the SVN files and other temp files." diff --git a/pandora_server/DEBIAN/postinst b/pandora_server/DEBIAN/postinst index 59f076898e..921f9427d9 100755 --- a/pandora_server/DEBIAN/postinst +++ b/pandora_server/DEBIAN/postinst @@ -56,54 +56,26 @@ get_distro () { } +echo "Creating common Pandora FMS directories" +useradd pandora 2> /dev/null +mkdir -p /home/pandora/.ssh 2> /dev/null +chown -R pandora:root /home/pandora +chmod 755 /usr/local/bin/tentacle_server echo "Giving proper permission to /var/spool/pandora" -id -g www-data > /dev/null -if [ $? -eq 0 ] -then - chown -R pandora:www-data /var/spool/pandora/ -else - id -g www > /dev/null - if [ $? -eq 0 ] - then - chown -R pandora:www /var/spool/pandora/ - else - id -g apache > /dev/null - if [ $? -eq 0 ] - then - chown -R pandora:apache /var/spool/pandora/ - else - echo "No web server user found, some functionality might not perform correctly" - chown -R pandora:root /var/spool/pandora - fi - fi -fi +chown -R pandora /var/spool/pandora/ + +echo "Creating setup directory in /etc/pandora" +mkdir /etc/pandora 2> /dev/null chmod 770 /etc/pandora/pandora_server.conf -GET_DISTRO="`get_distro`" -DISTRO=`echo $GET_DISTRO | cut -f 1 -d ":"` +echo "Linking startup script to /etc/rc2.d" +ln -s /etc/init.d/pandora_server /etc/rc2.d/S90pandora_server -if [ "$DISTRO" == "UBUNTU" ] -then - echo "Linking startup script to /etc/rc2.d" - ln -s /etc/init.d/pandora_server /etc/rc2.d/S90pandora_server -else - INITLV=`cat /etc/inittab | grep "[0-9]\:initdefault" | cut -f 2 -d ":"` - echo "Linking startup script to /etc/rc.d/rc$INITLV.d" - ln -s /etc/init.d/pandora_server /etc/rc.d/rc$INITLV.d/S90pandora_server -fi - -if [ "$DISTRO" == "UBUNTU" ] -then - # Tentacle server install (Ubuntu) - echo "Installing tentacle server in /etc/rc2.d/S80tentacle_serverd" - ln -s /etc/init.d/tentacle_serverd /etc/rc2.d/S80tentacle_serverd -else - # Tentacle server install (SUSE) - echo "Installing tentacle server in /etc/rc.d/rc$INITLV.d/S80tentacle_serverd" - ln -s /etc/init.d/tentacle_serverd /etc/rc.d/rc$INITLV.d/S80tentacle_serverd -fi +# Tentacle server install +echo "Installing tentacle server in /etc/rc2.d/S80tentacle_serverd" +ln -s /etc/init.d/tentacle_serverd /etc/rc2.d/S80tentacle_serverd if [ -d /etc/cron.daily ] then diff --git a/pandora_server/DEBIAN/prerm b/pandora_server/DEBIAN/prerm index 4e1a67b492..592a569797 100755 --- a/pandora_server/DEBIAN/prerm +++ b/pandora_server/DEBIAN/prerm @@ -60,17 +60,13 @@ rm /etc/pandora/pandora_server.conf GET_DISTRO="`get_distro`" DISTRO=`echo $GET_DISTRO | cut -f 1 -d ":"` -if [ "$DISTRO" == "UBUNTU" ] -then - rm /etc/init.d/pandora_server /etc/rc2.d/S90pandora_server - rm /etc/init.d/tentacle_serverd /etc/rc2.d/S80tentacle_serverd -else - INITLV=`cat /etc/inittab | grep "[0-9]\:initdefault" | cut -f 2 -d ":"` - rm /etc/init.d/pandora_server /etc/rc.d/rc$INITLV.d/S90pandora_server - rm /etc/init.d/tentacle_serverd /etc/rc.d/rc$INITLV.d/S80tentacle_serverd -fi +rm /etc/init.d/pandora_server +rm /etc/rc2.d/S90pandora_server +rm /etc/init.d/tentacle_serverd +rm /etc/rc2.d/S80tentacle_serverd if [ -d /etc/cron.daily ] then rm /etc/cron.daily/pandora_db fi + diff --git a/pandora_server/pandora_server_upgrade b/pandora_server/pandora_server_upgrade index a80e833b9c..31d14df81e 100644 --- a/pandora_server/pandora_server_upgrade +++ b/pandora_server/pandora_server_upgrade @@ -20,23 +20,37 @@ install () { chmod 750 pandora_* chmod 750 util/*.pl chmod 750 util/*.sh - chmod 750 util/pandora_exec chmod 750 util/tentacle_serverd chmod 750 util/pandora_server chmod 750 util/plugin/* echo "Copying utilities...." cp -R util /usr/share/pandora_server + cp bin/pandora_exec /usr/local/bin + + echo "Rebuilding links /usr/local/bin -> /usr/bin" + rm /usr/bin/pandora_server + rm /usr/bin/pandora_exec + ln -s /usr/local/bin/pandora_server /usr/bin + ln -s /usr/local/bin/pandora_exec /usr/bin + ln -s /usr/local/bin/tentacle_server /usr/bin + + if [ -d /etc/logrotate.d ]; then + echo "Creating logrotate.d entry for Pandora FMS log management" + cp util/pandora_logrotate /etc/logrotate.d/pandora + else + echo "Please add a log rotation schedule manually to your log rotation daemon (if any)" + fi echo "Copying startup scripts to /etc/init.d...." - cp pandora_server /etc/init.d + cp util/pandora_server /etc/init.d cp util/tentacle_serverd /etc/init.d if [ ! -e /etc/cron.daily/pandora_purge_db ] then echo "You don't have a /etc/cron.daily/pandora_purge_db file, you should consider" echo "to setup the Pandora FMS daily Database Maintance script: " - echo " perl /usr/share/pandora/util/pandora_db.pl /etc/pandora/pandora_server.conf" + echo " perl /usr/share/pandora_server/util/pandora_db.pl /etc/pandora/pandora_server.conf" fi echo " " diff --git a/pandora_server/util/pandora_checkdep.pl b/pandora_server/util/pandora_checkdep.pl deleted file mode 100755 index 6c02585207..0000000000 --- a/pandora_server/util/pandora_checkdep.pl +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/perl - -# Copyright (c) 2007 Artica Soluciones Tecnologicas S.L. - -use Date::Manip; # Needed to manipulate DateTime formats of input, output and compare -use Time::Local; # DateTime basic manipulation -use Net::Ping; # For ICMP latency -use Time::HiRes; # For high precission timedate functions (Net::Ping) -use IO::Socket; # For TCP/UDP access -use SNMP; # For SNMP access (libsnmp-perl PACKAGE!) -use threads; -use NetAddr::IP; # To manage IP Addresses -use POSIX; # to use ceil() function -use Socket; # to resolve address -use XML::Simple; # Useful XML functions -use Digest::MD5; -use DBI; -use File::Copy; - -print "All dependencies tested and OK\n\n"; -