2010-10-14 Sancho Lerena <slerena@artica.es>

* 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
This commit is contained in:
slerena 2010-10-14 12:08:45 +00:00
parent 94139bedec
commit ab30eab5c0
3 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,10 @@
2010-10-14 Sancho Lerena <slerena@artica.es>
* 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 <slerena@artica.es>

View File

@ -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;
}

View File

@ -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