This is a quick reply, as I am very busy and non-urgent bugs will take
some time to address.

I have looked through this mail several times now, and I cannot decide
what bug is being reported. I shall certainly look at the conditional
evaluation, but you have already found a workaround for that.

In short, it is not clear to me whether there is an actual bug here as
there is not enough information to see what you are trying.

Looking at my current schedule, it will take me several weeks to
before I can spend any time on this. I recommend finding a workaround
for the problem you are having, and perhaps providing more information
about the exact syntax you are using. (Apologies if you have provided
this on the sourceforge site - I have not gone into depth there)

Mark

SiliconSlick wrote:
> Howdy cfengineers,
> 
> I filed a bug last month at the sourceforge and
> haven't seen any notice of attention.  On
> #cfengine I was told I'd have better luck here.
> 
> The report is at:
> 
> http://sourceforge.net/tracker/index.php?func=detail&aid=1848895&group_id=126712&atid=706640
> 
> but I'll repeat it here just in case.
> 
> ======================================================
> 
> I'm having a problem with cfengine 2.2.3 involving
> conditionals/group testing in the editfiles section.
> 
> I've attached a test case. It still has some
> crud from the original task I was using it for
> so it has to be run with sudo (in order to stop
> cups).
> 
> Basically, what I was trying to do is:
> 1) stop cupsd
> 2) add a printer definition to /etc/cups/printers.conf
> 3) restart cupsd
> 
> However, it didn't work at first. The is something
> wrong with the conditional testing in the editfiles.
> I had to rewrite the rule using DeMorgan's law in order
> for cfengine to do the right thing, but I shouldn't have too.
> 
> When I run it, I get something like this:
> =============
> $ sudo ./cfbug.cf
> Password:
> cfengine:myhost:nit.d/cups stop: Stopping cups: [ OK ]
> cfengine:myhost:nit.d/cups star: Starting cups: [ OK ]
> cfengine:myhost: linux, and centos, and cups stopped, and not a print
> server, and don't have G85 (should foo)
> cfengine:myhost: linux, and centos, and cups stopped, and not a print
> server or have G85 (should bar)
> cfengine:perrymason: did bar
> $ cat /tmp/foo
> $ cat /tmp/bar
> bar
> =============
> 
> Note that conditional for the alert and the edit files is the same. That
> is, if it shows the "should foo" alert then it should similarly make the
> edit to /tmp/foo. However, it doesn't.
> 
> I have a feeling it has something to do with a limit on
> the number of conditionals that the editfiles section
> is looking at (i.e. only seems ot have the problem
> when there are 5 or more conditions), but I'm
> not sure.
>                                                                               
>                                                                               
>       
> ======================================================
> 
> The revised/cleaned-up test case is attached.
> 
> Any help appreciated.
> 
> jack/slick
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bug-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/bug-cfengine
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to