Re: Problem recognizing existence of directory

2009-12-17 Thread NWatson
Brendan Strejcek wrote on 2009-12-17 10:44:35: > This is reliable, but not very efficient. It requires at least 2N file > checksum calculations (where N is the number of files in the tree > being copied or verified) on every pass. You are also using 2N space, > since you are storing a copy in ${s

Re: Problem recognizing existence of directory

2009-12-17 Thread Brendan Strejcek
a little frustrating to need > so much time and effort for such small problems. I know CF3 is a good and > helpfull tool, but it's too hard to work with. > > Bernd > > > > > > > From:nwat...@symcor.com > To: > bernd.adamow...@external.icw-global.com > Cc:N

Re: Problem recognizing existence of directory

2009-12-17 Thread Brendan Strejcek
Regarding your original case, it would be more natural to use isdir() rather than fileexists() (though both should work). I can't replicate any problems with either isdir() or fileexists() though. I also tried interpolating a variable into the path checked for, because that seems like a likely plac

Re: Problem recognizing existence of directory

2009-12-17 Thread NWatson
We've all been or are still there. CF's promise theory offers a different way of thinking. It's takes some time to adjust to it. Think of it like calculus. For a while your brain just explodes but, eventually it starts to make sense. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY

Re: Problem recognizing existence of directory

2009-12-17 Thread bernd . adamowicz
like a first day novice. It's a little frustrating to need so much time and effort for such small problems. I know CF3 is a good and helpfull tool, but it's too hard to work with. Bernd From: nwat...@symcor.com To: bernd.adamow...@external.icw-global.com Cc: Nicolas Charles , h

Re: Problem recognizing existence of directory

2009-12-17 Thread NWatson
Verbose output might be better than debug output for discovering faults. Also it might be more efficient to have CF copy the files recursively than copying a tar ball and then extracting it. You'll have greater reliability too as CF will log any problems during the copy. Sincerely, -- Neil Wat

Re: Problem recognizing existence of directory

2009-12-17 Thread bernd . adamowicz
promise for 'tar' is made, but it's not executed. Bernd From: Nicolas Charles To: bernd.adamow...@external.icw-global.com Cc: help-cfengine@cfengine.org Date: 17.12.2009 13:02 Subject: Re: Problem recognizing existence of directory Hi, Maybe you could use somethin

Re: Problem recognizing existence of directory

2009-12-17 Thread Nicolas Charles
Hi, Maybe you could use something like this : bundle agent check_nagios_installation { files: "${nagios_install_dir}/" create => "true", comment => "Creating nagios directory", classes => if_repaired("not_nagios_installed"); commands: not_nagios_instal

Problem recognizing existence of directory

2009-12-17 Thread bernd . adamowicz
I guess I'm facing a typical beginners problem, however, I didn't find a solution. I'm checking the existence of a directory. If it's not there, I'm going to extract a tarball which creates it and some other files. This works very fine. However the extracting of the tarball is done sometimes to