]> granicus.if.org Git - icinga2/commitdiff
Config Conversion: Detect user macros properly.
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 29 Aug 2013 12:59:46 +0000 (14:59 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 29 Aug 2013 12:59:46 +0000 (14:59 +0200)
tools/configconvert/Icinga2/Convert.pm

index fa6fa8e2a11f31477664c1e507141cb40b31a87b..199d0b711bad6c7b1a66fe2b9162ac319752362a 100644 (file)
@@ -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}");
             }