help-cfengine
[Top][All Lists]
Advanced

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

Importing files in order


From: Chip Seraphine
Subject: Importing files in order
Date: Tue, 07 Oct 2003 11:18:39 -0500
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.2.1) Gecko/20030121


My import section pulls in several files and, at the end, does this:

cf.foo

complain::
        cf.complain


The idea is that if one of the previous imports sets the 'complain' class, then cf.complain will execute and various alerts/emails/syslog messages/whatever are generated depending on wether or not other classes are also defined.

The problem is that the master file does not see the "complain" class being defined by the previous imports, so even if cf.foo defines 'complain' then cf.complain is not imported.

Is there a good way to guarantee that the section is processed in order? Since import: isn't in the actionsequence, I can't do what I usually do and just rerun it with a bogus class appended (something like "actionsequence = ( import import.pass2 )"). I have considered having an unconditional import at the bottom that then does a conditional import of complain, but that is very kludgey.

Any suggestions/tips/tricks?





reply via email to

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