mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Fixed ha Perl Warning that maybe gave problems with parse the output
This commit is contained in:
parent
774afe902c
commit
b9f0bf17f5
@ -3008,19 +3008,25 @@ sub cli_get_agent_modules() {
|
||||
}
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
########################################################################
|
||||
# Show all the modules of a policy
|
||||
# Related option: --get_policy_modules
|
||||
##############################################################################
|
||||
########################################################################
|
||||
|
||||
sub cli_get_policy_modules() {
|
||||
my $policy_name = @ARGV[2];
|
||||
|
||||
my $policy_id = enterprise_hook('get_policy_id',[$dbh, safe_input($policy_name)]);
|
||||
my $policy_id = enterprise_hook('get_policy_id',
|
||||
[$dbh, safe_input($policy_name)]);
|
||||
exist_check($policy_id, 'policy', $policy_name);
|
||||
|
||||
my $policy_modules = enterprise_hook('get_policy_modules',[$dbh, $policy_id]);
|
||||
exist_check(scalar(@{$policy_modules})-1,'modules in policy',$policy_name);
|
||||
my $policy_modules = enterprise_hook(
|
||||
'get_policy_modules', [$dbh, $policy_id]);
|
||||
|
||||
if (defined($policy_modules)) {
|
||||
exist_check(scalar(@{$policy_modules}) - 1, 'modules in policy',
|
||||
$policy_name);
|
||||
}
|
||||
|
||||
print "id_policy_module, module_name\n";
|
||||
foreach my $module (@{$policy_modules}) {
|
||||
@ -3028,10 +3034,11 @@ sub cli_get_policy_modules() {
|
||||
}
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Show all the policies (without parameters) or the policies of given agent
|
||||
########################################################################
|
||||
# Show all the policies (without parameters) or the policies of given
|
||||
# agent.
|
||||
# Related option: --get_policies
|
||||
##############################################################################
|
||||
########################################################################
|
||||
|
||||
sub cli_get_policies() {
|
||||
my $agent_name = @ARGV[2];
|
||||
|
Loading…
x
Reference in New Issue
Block a user