From ab30eab5c0587d40e3752e232dc60d862c1e6ff3 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 14 Oct 2010 12:08:45 +0000 Subject: [PATCH] 2010-10-14 Sancho Lerena * PandoraFMS/Core.pm: Fixed bug #3085249 about empty extra_macros hash. * util/pandora_backup.sh: Fixed bug #3080826 about backup of links, now are using -h parameter on tar to get the real file instead the link. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3398 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/lib/PandoraFMS/Core.pm | 2 +- pandora_server/util/pandora_backup.sh | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 208323342f..6319e1f1b1 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,5 +1,10 @@ 2010-10-14 Sancho Lerena + * PandoraFMS/Core.pm: Fixed bug #3085249 about empty extra_macros hash. + + * util/pandora_backup.sh: Fixed bug #3080826 about backup of links, now + are using -h parameter on tar to get the real file instead the link. + * util/pandora_manage.pl: Removed some warnings. 2010-10-13 Sancho Lerena diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 39902d6f16..f811d29fd2 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -621,7 +621,7 @@ sub pandora_execute_action ($$$$$$$$$;$) { _id_alert_ => $alert->{'id'} ); - if (defined ($extra_macros)){ + if ((defined ($extra_macros)) && (ref($extra_macros) eq "HASH")) { while ((my $macro, my $value) = each (%{$extra_macros})) { $macros{$macro} = $value; } diff --git a/pandora_server/util/pandora_backup.sh b/pandora_server/util/pandora_backup.sh index 5b1a7c52dd..e101a1eb62 100755 --- a/pandora_server/util/pandora_backup.sh +++ b/pandora_server/util/pandora_backup.sh @@ -97,9 +97,9 @@ then if [ $DATABASE == 1 ] then mysqldump -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME > pandorafms_backup_$TIMESTAMP.sql - tar cvzf pandorafms_backup_$TIMESTAMP.tar.gz pandorafms_backup_$TIMESTAMP.sql $PANDORAPATH/* /etc/pandora /var/spool/pandora/data_in --exclude .data 2> /dev/null > /dev/null + tar cvzfh pandorafms_backup_$TIMESTAMP.tar.gz pandorafms_backup_$TIMESTAMP.sql $PANDORAPATH/* /etc/pandora /var/spool/pandora/data_in --exclude .data 2> /dev/null > /dev/null else - tar cvzf pandorafms_backup_$TIMESTAMP.tar.gz $PANDORAPATH/* /etc/pandora /var/spool/pandora/data_in --exclude .data 2> /dev/null > /dev/null + tar cvzhf pandorafms_backup_$TIMESTAMP.tar.gz $PANDORAPATH/* /etc/pandora /var/spool/pandora/data_in --exclude .data 2> /dev/null > /dev/null fi mv /tmp/$TIMESTAMP/pandorafms_backup_$TIMESTAMP.tar.gz $BACKUPDIR