From 1b26b486b44b8df9ca156f44b29e5195f3c68076 Mon Sep 17 00:00:00 2001 From: vpalluel Date: Mon, 9 Feb 2015 11:21:38 +0100 Subject: [PATCH 1/2] modif config-path --- centreon-plugins/apps/centreon/local/mode/retentionbroker.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/centreon-plugins/apps/centreon/local/mode/retentionbroker.pm b/centreon-plugins/apps/centreon/local/mode/retentionbroker.pm index bc57ec1f3..4e6fb0c69 100644 --- a/centreon-plugins/apps/centreon/local/mode/retentionbroker.pm +++ b/centreon-plugins/apps/centreon/local/mode/retentionbroker.pm @@ -40,6 +40,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; use XML::LibXML; +use Data::Dumper; sub new { my ($class, %options) = @_; @@ -51,7 +52,7 @@ sub new { { "rrd-config-file:s" => { name => 'rrd_config_file', default => 'central-rrd.xml' }, "sql-config-file:s" => { name => 'sql_config_file', default => 'central-broker.xml' }, - "config-path" => { name => 'config_path', default => '/etc/centreon-broker/' }, + "config-path:s" => { name => 'config_path', default => '/etc/centreon-broker/' }, }); return $self; } @@ -59,6 +60,8 @@ sub new { sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); + print $self->{option_results}->{config_path}; + print Dumper(\$self); if ($self->{option_results}->{config_path} !~ /\/$/) { $self->{output}->add_option_msg(short_msg => "Please set the last / the path to your config-path option"); $self->{output}->option_exit(); From b731c0cebb2c7c9aafe338ca361d0d5529593884 Mon Sep 17 00:00:00 2001 From: vpalluel Date: Mon, 9 Feb 2015 11:43:47 +0100 Subject: [PATCH 2/2] modif --- centreon-plugins/apps/centreon/local/mode/retentionbroker.pm | 3 --- 1 file changed, 3 deletions(-) diff --git a/centreon-plugins/apps/centreon/local/mode/retentionbroker.pm b/centreon-plugins/apps/centreon/local/mode/retentionbroker.pm index 4e6fb0c69..f170415ef 100644 --- a/centreon-plugins/apps/centreon/local/mode/retentionbroker.pm +++ b/centreon-plugins/apps/centreon/local/mode/retentionbroker.pm @@ -40,7 +40,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; use XML::LibXML; -use Data::Dumper; sub new { my ($class, %options) = @_; @@ -60,8 +59,6 @@ sub new { sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); - print $self->{option_results}->{config_path}; - print Dumper(\$self); if ($self->{option_results}->{config_path} !~ /\/$/) { $self->{output}->add_option_msg(short_msg => "Please set the last / the path to your config-path option"); $self->{output}->option_exit();