On Wed, Nov 3, 2010 at 11:23 PM, <no-re...@cfengine.com> wrote: > Forum: Cfengine Help > Subject: Error when trying to define classes in "copy_from" > Author: johanwiren > Link to topic: https://cfengine.com/forum/read.php?3,19044,19044#msg-19044 > > > > files: > > myClass:: > > "/etc/httpd/conf.d/proxy_ajp.conf" > > perms => u_p("600"), > copy_from => > secure_cp("$(g.filestore)/etc/httpd/conf.d/proxy_ajp.conf.ATST","$(g.policy_host)"), > classes => on_change("restartHttpd"), > action => immediate; > > > This gives me: > No such FnCall "on_change()" in promise @ ./filename.cf near line 122 > > I have also tried > classes => define("restartHttpd") > with the same result. > > What am I doing wrong? >
You dont seem to have a body "on_change" defined. Try using "if_repaired" from the Cf stdlib instead. Remember that parameters to promise options are just bodies/bundles that need to be defined somewhere (when not a simple string) - if you cant see it in one of the .cf files you have included, it wont work. > How do I define a class when the copy_from has actually changed a file? > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine >
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine