summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/custodian-enqueue21
1 files changed, 17 insertions, 4 deletions
diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue
index 4678562..9a261b7 100755
--- a/bin/custodian-enqueue
+++ b/bin/custodian-enqueue
@@ -209,13 +209,26 @@ class MonitorConfig
elsif ( line =~ /\s(is|are)\s+(.*)\.+$/ )
#
- # Literal list.
+ # Literal list of hosts
#
- tmp = $2.dup.split( /\s+and\s+/ )
- tmp.each do |entry|
- val.push( entry )
+ hosts = $2.dup
+
+ #
+ # If there is " and " then tokenize
+ #
+ if ( hosts =~ /\s+and\s+/ )
+ tmp = hosts.split( /\s+and\s+/ )
+ tmp.each do |entry|
+ val.push( entry )
+ end
+ else
+ #
+ # Otherwise a single host
+ #
+ val.push( hosts )
end
+
end
@MACROS[name] = val