2012-02-28 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* util/pandora_manage.pl: Modify call to function pandora_delete_not_policy_modules adding md5 filename like a parameter. Fixes: #3486481 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5668 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
11e31fa7d8
commit
5efa633432
|
@ -1,3 +1,11 @@
|
||||||
|
2012-02-28 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
|
* util/pandora_manage.pl: Modify call to function
|
||||||
|
pandora_delete_not_policy_modules adding md5 filename like a
|
||||||
|
parameter.
|
||||||
|
|
||||||
|
Fixes: #3486481
|
||||||
|
|
||||||
2012-02-28 Vanessa Gil <vanessa.gil@artica.es>
|
2012-02-28 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
* bin/PandoraFMS/Core.pm: Fixed bug: double safe_input in event name.
|
* bin/PandoraFMS/Core.pm: Fixed bug: double safe_input in event name.
|
||||||
|
|
|
@ -1357,7 +1357,7 @@ sub cli_create_plugin_module($) {
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Create delete module.
|
# Delete module.
|
||||||
# Related option: --delete_module
|
# Related option: --delete_module
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
@ -1375,14 +1375,16 @@ sub cli_delete_module() {
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Create delete not policy modules.
|
# Delete not policy modules.
|
||||||
# Related option: --delete_not_policy_modules
|
# Related option: --delete_not_policy_modules
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
sub cli_delete_not_policy_modules() {
|
sub cli_delete_not_policy_modules() {
|
||||||
my $incomingdir;
|
my $incomingdir;
|
||||||
|
my $incomingdirmd5;
|
||||||
|
|
||||||
$incomingdir = $conf->{incomingdir}.'/conf/';
|
$incomingdir = $conf->{incomingdir}.'/conf/';
|
||||||
|
$incomingdirmd5 = $conf->{incomingdir}.'/md5/';
|
||||||
|
|
||||||
# Open the folder
|
# Open the folder
|
||||||
opendir FOLDER, $incomingdir || die "[ERROR] Opening incoming directory";
|
opendir FOLDER, $incomingdir || die "[ERROR] Opening incoming directory";
|
||||||
|
@ -1390,12 +1392,17 @@ sub cli_delete_not_policy_modules() {
|
||||||
# Store the list of files
|
# Store the list of files
|
||||||
my @files = readdir(FOLDER);
|
my @files = readdir(FOLDER);
|
||||||
my $file;
|
my $file;
|
||||||
|
my $filemd5;
|
||||||
|
|
||||||
print "[INFO] Deleting modules without policy from conf files \n\n";
|
print "[INFO] Deleting modules without policy from conf files \n\n";
|
||||||
foreach $file (@files)
|
foreach $file (@files)
|
||||||
{
|
{
|
||||||
if($file ne '.' && $file ne '..') {
|
if($file ne '.' && $file ne '..') {
|
||||||
my $ret = enterprise_hook('pandora_delete_not_policy_modules', [$incomingdir.$file]);
|
# Creates md5 filename of agent
|
||||||
|
$filemd5 = $file;
|
||||||
|
$filemd5 =~ s/\.conf/\.md5/g;
|
||||||
|
|
||||||
|
my $ret = enterprise_hook('pandora_delete_not_policy_modules', [$incomingdir.$file, $incomingdirmd5.$filemd5]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue