On a quick look, I think you need to put the not() outside classify()
and not inside. Not tested.

--Diego

On Sep 7, 2012, at 12:04 PM, Nick Anderson <n...@cmdln.org> wrote:

> On 09/07/2012 11:53 AM, no-re...@cfengine.com wrote:
>> Forum: CFEngine Help
>> Subject: Re: Raise a class when class thing1 but not class thing2
>> Author: neilhwatson
>> Link to topic: https://cfengine.com/forum/read.php?3,27246,27247#msg-27247
>>
>> Nick,
>>
>> Did you check the verbose agent output to see what classes are defined 
>> during the run? I don't think it is possible to undefine a class.  So, if 
>> thing2 is defined in a early run it will still be there on later runs.
>
> It is possible to undefine a class, but I am trying to raise a class 
> (main_cat_test_redfish) when one class (main_cat_test_thing1) is defined, but 
> another (main_cat_test_thing2) is not defined.
>
> main_cat_test_thing2 should only be defined when cat_tail is true.
> main_cat_test_redfish should only be defined when main_cat_test_thing2 is not 
> defined
>
> $ cf-agent -KvIf ./class_when_thing1_but_not_thing2.cf | grep +
> cf3>      +  Private classes augmented:
> cf3>      +  Private classes augmented:
> cf3>      +       main_cat_test_redfish
> cf3>      +       main_cat_test_thing2
> cf3>      +       main_cat_test_thing1
> cf3>      +  Private classes augmented:
> cf3>      +       main_cat_test_redfish
> cf3>      +       main_cat_test_thing2
> cf3>      +       main_cat_test_thing1
> cf3>      +  Private classes augmented:
> cf3>      +       main_cat_test_redfish
> cf3>      +       main_cat_test_thing2
> cf3>      +       main_cat_test_thing1
> cf3>      +  Private classes augmented:
> cf3>      +  Private classes augmented:
>
> R: Hat: true
> R: Tail: true
> R: I have a cat in a hat with no tail
>
> <class_when_thing1_but_not_thing2.cf>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to