Mike
This doesn't have to look like cfengine, just be the same sort of
idea. Thinkg out loud, could it be this simple? The main script
does the defines, figuring out IP addresses, time of day/month/year,
and the other things that cfengine defines and creates those
proc's like 'actionsequence' and 'action'. Then the cftcl
configuration script does
----- cftcl program/controlling script
proc actionsequence {actions} {
set $::actionsequence actions
}
proc action {name test body} {
if {[info exists actions($type)] == 0} {
set actions($type) {}
}
if {[string length $test] <= 0} {
set test 1
}
if {[string length $body] <= 0} {
set body "puts action $name with test $test and body $body has an empty body"
}
lappend actions($type) [list test body]
}
------ cftcl.cfg configuration file
require cvstcl ;# what's the name of the pure tcl cvs client package?
source cf.groups.tcl
source cf.sun.tcl
actionsequence {copy tidy}
action copy {} {
# copy something
}
action tidy {$defines(day-of-week) == 0} {
exec sh -c {find /tmp -mtime +30 -print | xargs rm -rf}
}
Regards,
Stéphane