You are on the right track, you just need to define "define()". The define() is a body template, not an inbuilt function. Take a look at this
http://www.cfengine.org/manuals/cf3-solutions.html for a standard set of these and lots of examples. If you use this new standard, you can replace define() with if_repaired(), and just include the standard definitions. Good luck. See also the upgrade guide http://www.cfengine.org/cftimes/articles/0000000020.html M Simeon Zaharici wrote: > Hi > > I am long time user of cfengine2 and just started playing with cfengine3 > ( cfengine-3.0.3). What I am trying to accomplish is extremely simple, > copy a file and then do an action if the file is copied over. > I put up a simple config based on Neil Watson's tutorial and tried > adding these lines to promises.cf > > body common control { > bundlesequence => { > ..................................... > "copyfiles" > }; > bundle agent copyfiles > { > > files: > "/etc/ssh/sshd_config" > perms => usystem("0600"), > copy_from => umycopy("/repository/cf3/etc/ssh/ssh_config"), > classes => define("reload_sshd"); > > commands: > "/etc/init.d/sshd reload" > comment => 'reload sshd', > ifvarclass => "reload_sshd"; > > } > > If i try to run this I get : > No such FnCall "define()" in promise @ /var/cfengine/inputs/promises.cf > near line 72 > > What is the proper way of defining a class in cfengine 3 ? > > Thanks for you support > > > > ------------------------------------------------------------------------ > Make your browsing faster, safer, and easier with the new Internet > Explorer® 8. Optimized for Yahoo! *Get it Now for Free! * > <http://downloads.yahoo.com/ca/internetexplorer/> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine -- Mark Burgess ------------------------------------------------- Professor of Network and System Administration Oslo University College, Norway Personal Web: http://www.iu.hio.no/~mark Office Telf : +47 22453272 ------------------------------------------------- _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine