help-cfengine
[Top][All Lists]
Advanced

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

Re: Executing commands depending on results


From: Phil D'Amore
Subject: Re: Executing commands depending on results
Date: Tue, 11 Nov 2003 12:26:12 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

Generally I use shellcommands for this one. Just execute your packages checks before your shellcommands in the actionsequence, so you have something like this:

control:
   actionsequence ( packages shellcommands )  # Among other things

packages:
rpm-build version=0:4.1-1 cmp=le define=true_class elsedefine=false_class

shellcommands:
   true_class::
         <comamnd>

   false_class::
         <command>

I use this to install packages, as well as to prevent the execution of some commands until after the package is installed (which takes 2 executions of the agent for the configuration to converge but I don't have a problem with that). Being the one who wrote the packages action, I could never find a way to integrate dependant commands into the action, and stopped trying because shellcommands is probably the place for them anyhow :).

Harish Chauhan wrote:

Hi,

I am testing cfengine to manage Linux machines. We have a typical requirement at this stage, what we want is as follows :
....
........

packages :

       linux : :

rpm-build version=0:4.1-1 cmp=le define=true_class elsedefine=false_class

       true_class::
< we want to execute some commands at this stage > Example : rpm -Uvh /..../,,,,,/ rpm-build-1.4.0*

       false_class::
               < we want to execute some commands at this stage >

tidy :


Looking forward to your reply.....

Thanks in advance..

Regards, Harish Chauhan
------------------------------------------------------------------------

_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://mail.gnu.org/mailman/listinfo/help-cfengine

--
Phil D'Amore                             "Sometimes there is a fine line
Senior System Administrator               between criminally abusive
Red Hat, Inc                              behavior and fun."
Office: 919.754.3700 x44395                 -- Ted the Generic Guy
Pager: 877.383.8795                            (Dilbert 4/19/2003)






reply via email to

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