bug-cfengine
[Top][All Lists]
Advanced

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

Re: file copy not setting dynamic classes


From: John Valdes
Subject: Re: file copy not setting dynamic classes
Date: Tue, 27 Mar 2001 22:41:18 -0600

On Tue, Mar 27, 2001 at 08:57:10PM -0000, benf wrote:
> 
> I'm running 1.6.3 on redhat 7.0 boxes. I'm trying to define a class set
> depending on if a file is copied or not - which seems to work, but the 
> class seems to disappear by the time the shellcommand stuff is run.
> 
> 
> Here is the  relevant section of cfengine.conf:
>       shellcommands:
>               dogday::
>                       "/bin/echo > /tmp/newrpms"
>               dogday2::
>                       "/bin/echo > /tmp/nonewrpms"
> 
>       copy:
>               linux::
>                       /usr/local/src/dog
>                               dest=/usr/local/src/dog
>                               server=$(cf_server)
>                               action=fix
>                               define=dogday
>                               elsedefine=dogday2
> 
> In the output below, the file exists so dogday2 should get defined.
> It claims to do it, but the shell command does not run.

Just a guess, but try listing your copy: section ahead of the
shellcommands: section in your cfengine.conf file.  Also, I assume
that "copy" is listed ahead of "shellcommands" in the actionsequence
under the control: session.  Eg, try:

  control:
        actionsequence = 
                ( 
                copy
                shellcommands
                )
  copy:
        linux::
                /usr/local/src/dog
                        dest=/usr/local/src/dog
                        server=$(cf_server)
                        action=fix
                        define=dogday
                        elsedefine=dogday2
  shellcommands:
        dogday::
                "/bin/echo > /tmp/newrpms"
        dogday2::
                "/bin/echo > /tmp/nonewrpms"

John



reply via email to

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