[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ReturnsZero(): command does not return zero. Is class created with v
From: |
Mark . Burgess |
Subject: |
Re: ReturnsZero(): command does not return zero. Is class created with value of false? |
Date: |
Tue, 30 Sep 2003 20:07:29 +0200 (MEST) |
!class is true if class does not exist. Your problem might be
related to a bug that some have reported in evaluating
classes with the string ".!class". Try swapping the order
of the classes and see if it makes a difference
M
On 30 Sep, Hans Deragon wrote:
> Mark.Burgess@iu.hio.no wrote:
>> Classes have no value, they either exist or they do not.
>> M
>>
>> On 30 Sep, Hans Deragon wrote:
>
> Ok, so...
>
> 1) Is it documented somewhere? I have failed to read this.
>
> 2) How do you suggest me to perform the equivalent of:
>
> lmclxadm.!accountexist?
>
> In fact, how does the ! operator works, if classes simply
> exist or not?
>
> Ciao
> Hans
>>
>>>Greetings.
>>>
>>>
>>> If ReturnsZero() is false, is it normal that the class ¨accountexist¨ in
>>> my
>>>following example is not created? I would expect it to take the value of
>>>false
>>>instead of being non existant. In my example, if the account lmclxadm does
>>>not
>>>exist in the /etc/passwd file, the /bin/echo command is not executed.
>>>
>>>--->
>>>classes:
>>>
>>> accountexist = ( ReturnsZero(/bin/fgrep -c lmclxadm /etc/passwd) )
>>>
>>>control:
>>>
>>> IfElapsed = ( 0 )
>>> actionsequence =
>>> (
>>> shellcommands.lmclxadm
>>> )
>>>
>>>shellcommands:
>>>
>>> lmclxadm.!accountexist::
>>>
>>> "/bin/echo Working"
>>><---
>>>
>>>Execution:
>>>
>>>--->
>>>IsBuiltinFunction: ReturnsZero(/bin/fgrep -c lmclxadm /etc/passwd)
>>>HandleFunction: ReturnsZero(/bin/fgrep -c lmclxadm /etc/passwd)
>>>HandleReturnsZero(/bin/fgrep -c lmclxadm /etc/passwd)
>>>Shell command was non-zero
>>>[No match of class]
>>><---
>
>
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272 Email: Mark.Burgess@iu.hio.no
Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~