help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ReturnsZero(): command does not return zero. Is class created with value


From: Hans Deragon
Subject: ReturnsZero(): command does not return zero. Is class created with value of false?
Date: Tue, 30 Sep 2003 11:10:20 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030905

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]
<---


Best regards,
Hans Deragon
--
Consultant en informatique/Software Consultant
Deragon Informatique inc.         Open source:
http://www.deragon.biz            http://swtmvcwrapper.sourceforge.net
mailto://hans@deragon.biz         http://autopoweroff.sourceforge.net






reply via email to

[Prev in Thread] Current Thread [Next in Thread]