[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
addclasses and execresult
From: |
Luke A. Kanies |
Subject: |
addclasses and execresult |
Date: |
Tue, 24 Jun 2003 17:15:38 -0500 (CDT) |
Hi all,
Is it possible to use ExecResult with AddClasses? I can't seem to get it
to work with more than on class:
control:
AddClasses = ( ExecResult(/bin/echo "funtest morefuntest") )
actionsequence = ( shellcommands )
#----------------------------------------------------------------------
shellcommands:
funtest::
"/bin/echo um, fun yay"
When I run this, I get "funtest morefuntest" enabled as a class, rather
than them both enabled separately. I've tried separating them with ':'
and '\n' instead of ' ', but with no difference. Obviously, this is a
trivial example and is not something I'd use in real life.
If I can do this, then I have to use a module to enable classes, but
cfengine seems to behave strangely WRT to ordering of modules. For
instance, if I have a file like the following:
control: actionsequence = ( files)
files: /tmp/fun mode=644
control: actionsequence = ( "module:echo +funtest" files )
files: funtest:: /tmp/morefun mode=644
Then both 'files' sections are added together and run before the module
ever gets run, which means that the '/tmp/morefun' file is never operated
on.
Basically, I need some way to enable classes within cfengine as early as
possible in the parsing/execution process. I thought my module method was
working, but I am getting inconsistent results, and it's definitely not
straightforward. Is anyone doing this, and if so, how?
Thanks,
Luke
--
"Don't let your sense of morals prevent you from doing what is right."
-- Asimov, "Foundation"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- addclasses and execresult,
Luke A. Kanies <=