Hi,

I have what's sure to be a simple question about the way import: works
with defined classes, yet, the simple answer eludes me.

I have in cfagent.conf:
import:
        any::
                main.cf

In main.cf I have:
control:
  actionsequence = ( resolve disks disable processes copy links tidy files 
editfiles shellcommands )

classes:
        FirstRun        = ( FileExists(/.cfengine-needs-init) )

import:
        FirstRun.linux::
                linux.firstrun.cf
shellcommands:
        RestartSomeService::
                "restart command here"

In linux.firstrun.cf I have:
editfiles:
        { /somefile

        AppendIfNoSuchLine "yaddah"
        DefineClasses "RestartSomeService"
        }

Now, everything in the linux.firstrun.cf file gets done happily, except, the classes it defines are not seen by the shellcommands: in main.cf, thus SomeService is never restarted.

The docs state that variables and macros created in child imports are not
available in the parent files, does this also include Defined Classes?

If so, would the logical solution be to move the importation of
linux.firstrun.cf into the cfagent.conf file before main.cf?

This is cfengine 2.1.12 and 2.1.14.

Thanks for any help one could give!

-n
--
-------------------------------------------
nathan hruby <[EMAIL PROTECTED]>
uga enterprise information technology services
production systems support
metaphysically wrinkle-free
-------------------------------------------


_______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to