Hi,

attention - cfengine2 !!!

I'm trying to set a class based on other classes (compound statement), but
seem to be running into problems:

control:
    actionsequence = ( copy )
    pyver = ( 'somevalue' )

classes:
    has_etc_dir   = ( IsDir("/etc") )
    has_ETC_dir   = ( IsDir("/ETC") )
    has_version   = ( IsDefined(pyver) )
    000_setme     = ( IsDefined(pyver).IsDir(/etc) ) # should return true
    001_setme     = ( IsDefined(pyver)&IsDir(/etc) ) # should return true
    002_setme     = ( IsDefined(pyver).!IsDir(/etc) ) # should return false
    003_setme     = ( IsDefined(pyver).!IsDir(/ETC) ) # should return true
    004_setme     = ( has_version.has_etc_dir )
    005_setme     = ( has_version.!has_ETC_dir )

alerts:

    000_setme::
        "version and directory (with period)"
    001_setme::
        "version and directory (with ampersand)"
    002_setme::
        "version but not directory"
    003_setme::
        "version but not (nonexisting) directory"
    004_setme::
        "both as explicit ANDed true classes"
    005_setme::
        "both as explicit AND-NOTed classes"


Only 004 and 005 work as expected. I assume that you cannot do something like 

IsDefined(pyver).!IsDir(/etc) ??? Or do I misunderstand something?

Thanks in advance,
Sven

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to