help-cfengine
[Top][All Lists]
Advanced

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

shellcommands and class defines


From: Elmar Kurgpold
Subject: shellcommands and class defines
Date: Tue, 31 Oct 2000 18:16:35 -0800 (PST)

Please take a look at this short script:

 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
control:
    moduledirectory = ( /opt/local/etc/cfinputs/modules )
    actionsequence = (
        module:current_pkgs.install_MyPkg
        shellcommands
        shellcommands.finish
    )

shellcommands:

    !finish.upgrade_MyPkg:: "/bin/echo removing old package"
        define=install_MyPkg

    !finish.install_MyPkg:: "/bin/echo installing MyPkg"
 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    Versions of cfengine tested:

1.5.4
1.6.0.a13

    Explanation of script:

The idea is to automate installation of a software package using
shellcommands.  At the same time, I also have defined a "finish" class
that does some undetermined cleanup tasks, probably unrelated to the
package upgrade. The first shellcommand does the package removal, and
there is a second shellcommand that does the installation of the new
package.  I did it this way so a system that did not have the package to
begin with could go straight to the install.

    Problem:

The "shellcommands.finish" action somehow causes the
"!finish.install_MyPkg" shellcommand to not execute.  As written, I get
the following output:

cfengine:tecate:/bin/echo remov: removing old package

If I comment out the shellcommands.finish line from actionsequence, then I
get the results I expected:

cfengine:tecate:/bin/echo remov: removing old package
cfengine:tecate:/bin/echo insta: installing MyPkg

I can't seem to make sense of this, it seems like it should work.
Thoughts?

        ++Elmar


|  Elmar Kurgpold
|  Email: address@hidden




reply via email to

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