From 42b98d2c89a7e92e662e20bd1be37921fec88974 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 29 Aug 2013 14:59:46 +0200 Subject: [PATCH] Config Conversion: Detect user macros properly. --- tools/configconvert/Icinga2/Convert.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configconvert/Icinga2/Convert.pm b/tools/configconvert/Icinga2/Convert.pm index fa6fa8e2a..199d0b711 100644 --- a/tools/configconvert/Icinga2/Convert.pm +++ b/tools/configconvert/Icinga2/Convert.pm @@ -997,7 +997,7 @@ sub convert_checkcommand { #Icinga2::Utils::debug("2x Command: $command_2x->{'check_command'}"); # detect $USERn$ macros and replace them too XXX - this should be a global macro? - if ($commands_1x->{$command_1x_key}->{'command_line'} =~/\$(USER\d)\$/) { + if ($commands_1x->{$command_1x_key}->{'command_line'} =~ /\$(USER\d+)\$/) { $command_2x->{'command_macros'}->{$1} = Icinga2::Utils::escape_str($user_macros_1x->{$1}); #debug("\$$1\$=$command_2x->{'macros'}->{$1}"); } -- 2.40.0