From 72cd1fd3eb5cf761f3e8cc3cabbb711018b90b7a Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Wed, 10 May 2017 10:22:01 +0200 Subject: [PATCH] + Fix convert-args arg --- centreon/plugins/script.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/centreon/plugins/script.pm b/centreon/plugins/script.pm index 3ddd9f9e8..d2ced4f50 100644 --- a/centreon/plugins/script.pm +++ b/centreon/plugins/script.pm @@ -129,7 +129,7 @@ sub convert_args { if ($self->{convert_args} =~ /^(.+?),(.*)/) { my ($search, $replace) = ($1, $2); for (my $i = 0; $i < $#ARGV; $i++) { - $ARGV[$i] =~ s/$search/$replace/g; + eval "\$ARGV[\$i] =~ s/$search/$replace/g"; } } } @@ -402,7 +402,7 @@ Set environment variables for the script (prefer to set it before running it for =item B<--convert-args> Change strings of arguments. Useful to use '!' in nrpe protocol. -Example: --convert-args='##,!' +Example: --convert-args='##,\x21' =back