Config Conversion: Detect user macros properly.

This commit is contained in:
Michael Friedrich 2013-08-29 14:59:46 +02:00
parent ec40251c4e
commit 42b98d2c89
1 changed files with 1 additions and 1 deletions

View 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}");
}