[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
simply, yet elusive import: question
From: |
nathan r. hruby |
Subject: |
simply, yet elusive import: question |
Date: |
Thu, 28 Apr 2005 11:59:11 -0400 (EDT) |
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 <nhruby@uga.edu>
uga enterprise information technology services
production systems support
metaphysically wrinkle-free
-------------------------------------------
- simply, yet elusive import: question,
nathan r. hruby <=