[prev in list] [next in list] [prev in thread] [next in thread]
List: cfengine-help
Subject: shellcommands and class defines
From: Elmar Kurgpold <elmarkurgpold () yahoo ! com>
Date: 2000-11-01 2:16:35
[Download RAW message or body]
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: elmarkurgpold@yahoo.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic