diff options
Diffstat (limited to 'lib/custodian')
-rw-r--r-- | lib/custodian/parser.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/custodian/parser.rb b/lib/custodian/parser.rb index ea25c3a..045711d 100644 --- a/lib/custodian/parser.rb +++ b/lib/custodian/parser.rb @@ -146,7 +146,7 @@ class MonitorConfig # # Get the name of the macro. # - name = $1.dup if ( line =~ /^([1-2A-Z_]+)\s+/ ) + name = $1.dup if ( line =~ /^([0-9A-Z_]+)\s+/ ) # @@ -257,7 +257,7 @@ class MonitorConfig elsif ( line =~ /^([0-9A-Z_]+)\s+(is|are)\s+/ ) define_macro( line ) - elsif ( line =~ /(.*)\s+must\s+ping(.*)/ ) + elsif ( line =~ /^(\S+)\s+must\s+ping(.*)/ ) # # Ping is a special case because the configuration file entry @@ -280,7 +280,7 @@ class MonitorConfig new_line = "#{pre} must run ping #{post}" return( parse_line( new_line ) ) - elsif ( line =~ /\s+must\s+run\s+([^\s]+)(\s+|\.|$)/i ) + elsif ( line =~ /^\S+\s+must\s+run\s+([^\s]+)(\s+|\.|$)/i ) # # Get the service we're testing, and remove any trailing "." |