On 17-09-10 11:57, Davide Brini wrote: > On Friday 17 Sep 2010 10:38:49 Mark Burgess wrote: > >> This is for dynamical classes set while the config is running. > > Thanks. Any way to do what I'm trying to do then? Basically I'd like to be > able to, say, touch a file and have the agent do nothing if it finds that file > (I know I can do that by changing the exec_command or switching to cron, but > I'm curious to see if there's something like that built-in). >
we have this bundel for cfengine3: bundle agent stop_cfengine { vars: "file" string => "/etc/no_cfengine", comment => "If this file exists abort cfengine run"; classes: "stop_cfengine" expression => fileexists( $(file) ); reports: stop_cfengine:: "CFengine is not allowed to execute: $(file)"; } body agent control { ifelapsed => "1"; abortclasses => { "stop_cfengine" }; debian:: default_repository => "/var/lib/cfengine3/repository"; } Just add stop_cfengine to the bundle sequence. To prevent cf-agent from running just touch the file. Regards -- ******************************************************************** * Bas van der Vlies e-mail: b...@sara.nl * * SARA - Academic Computing Services Amsterdam, The Netherlands * ******************************************************************** _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine