On Fri, 14 Dec 2001, Konstantin 'Kastus' Shchuka wrote:

>         exclude_period hr {11am} min {41-45}
> 
> This one produces an error :
> 
> Error in config file found:
> 
> cf error: unknown syntax [exclude_period hr {11am} min {41-45}], line 350

yeah, that's a bug. someone else reported it but i didn't look at it too
closely. here's a patch which fixes it (apply to "mon" from mon-0.99.2):

--- mon Sat Sep  8 09:42:05 2001
+++ /home/trockij/mon-992       Fri Dec 14 15:44:59 2001
@@ -1458,10 +1458,13 @@
                    $args = $ex;
                }
 
-               elsif ($var eq "exclude_period" && inPeriod (time, $args) == -1)
+               elsif ($var eq "exclude_period")
                {
-                   close (CFG);
-                   return "cf error: malformed exclude_period '$args' (the specified 
time period is not valid as per Time::Period::inPeriod), line $line_num";
+                   if (inPeriod (time, $args) == -1)
+                   {
+                       close (CFG);
+                       return "cf error: malformed exclude_period '$args' (the 
+specified time period is not valid as per Time::Period::inPeriod), line $line_num";
+                   }
                }
 
                else

Reply via email to