[Top][All Lists]

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

[Help-cfengine] shellcommand return-value defines

From: Mark R. Lindsey
Subject: [Help-cfengine] shellcommand return-value defines
Date: Thu, 21 Sep 2000 12:35:02 -0400


I have an application where I need to run a command, and define a 
class if the command returns true. 

        groups: SometimesDefinedClass = ( "/...some program" )
doesn't seem to be workable, because I need to define the class at a
specific point in the cfengine program. Specifically, I (1) perform
some editfiles, then (2) need to check to see if the edited files have
a specific property, and define a class if they have that property.

And the `define' parameter on a shellcommands statement doesn't seem
to be that useful; consider:
                actionsequence = ( shellcommands )

                "/bin/true" define=TrueDefined
                "/bin/false" define=FalseDefined

                TrueDefined:: "/bin/echo true defined it"
                FalseDefined:: "/bin/echo false defined it"
With cfengine 1.6.0.a10, both TrueDefined and FalseDefined are defined.
Thus, I can't tell the exit status of the shell command. (The meaning
of the define option on a shellcommands statement isn't really
explained in the tutorial nor in the reference manual.)

Is there a way to do what I need?


reply via email to

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