rename => rotate and depth_search => recursion

2010-06-03 Thread Seva Gluschenko
Hello folks, When I wrote a promise to rotate /var/cfengine/promise.log (BTW, why Cfengine doesn't rotate it?), cf-promises warned me about using rename body without depth_search body. Well, okay, despite I was surprised with such a requirement, I've added depth_search => recursion("1"). Now (with

cfengine3 modules

2010-06-03 Thread Vasiliy G Tolstov
Hello. Can anyone provide example module in sh that displays all environment variables from cfengine? Documentation says, that cf-agent provide environment variable that contains all classes. But if i write module like: !#/bin/sh printenv exit 0; In output i can't see any strings about cfengine

Re: cfengine3 questions and suggestion

2010-06-03 Thread Mark Burgess
Hi Bas, Bas van der Vlies wrote: > First lets start with a suggestion. there a lot function that return a > class, mabye a new function: >- LISA_CLUSTER expression => getenv_class("LISA"); > > Which set the class LISA_CLUSTER if the variable is defined. We now use > getenv and strcmp to do

cfengine3 questions and suggestion

2010-06-03 Thread Bas van der Vlies
First lets start with a suggestion. there a lot function that return a class, mabye a new function: - LISA_CLUSTER expression => getenv_class("LISA"); Which set the class LISA_CLUSTER if the variable is defined. We now use getenv and strcmp to do this I am reading a lot of documentation but

Re: dependencies of bundles

2010-06-03 Thread Daniel V Klein
Take a look at methods promises, and specifically the value given to the usebundle attribute. http://www.cfengine.org/manuals/cf3-reference.html#methods-in-agent-promises -Dan > Hello. I need some feature like dependecies in bundles. > > For example: i have 5 agent bundles that can do specific

dependencies of bundles

2010-06-03 Thread Vasiliy G Tolstov
Hello. I need some feature like dependecies in bundles. For example: i have 5 agent bundles that can do specific tasks. And i need a main agent bundle that depends of all of 5 small bundles... How can i do this thing? -- Vasiliy G Tolstov Selfip.Ru _

Scalar variable str contains itself (non-convergent): $(str)

2010-06-03 Thread Vasiliy G Tolstov
Scalar variable str contains itself (non-convergent): $(str) When i run my bundlesequence in verbose mode i get this error. What does it mean and how can i find file and line number? -- Vasiliy G Tolstov Selfip.Ru ___ Help-cfengine mailing list Help-

Re: Command execution if directory doesn't exist

2010-06-03 Thread Mark Burgess
Actually isdir() would be best here perhaps. :) M Nakarin Phooripoom wrote: > Alternatively, I would use a built-in function fileexists() to check there is > a directory or not then execute commands. > > classes: > "dir_exists" expression => fileexists("some/directory"); > "no_dir"

Re: Command execution if directory doesn't exist

2010-06-03 Thread Nakarin Phooripoom
Alternatively, I would use a built-in function fileexists() to check there is a directory or not then execute commands. classes: "dir_exists" expression => fileexists("some/directory"); "no_dir"not => fileexists("some/directory"); commands: dir_exists:: "command_1"; no_dir::