On Fri, Dec 11, 2009 at 12:49 PM, Matthias Teege wrote:
> Moin,
>
> > "exists" expression => filesexist("@(filelist)");
>
> I think this only works if the file is on all locations. I'm looking for
> "or".
>
> Many thanks
> Matthias
>
>
So fileexists($(filelist)); is what you need
Nicolas
___
Moin,
> "exists" expression => filesexist("@(filelist)");
I think this only works if the file is on all locations. I'm looking for
"or".
Many thanks
Matthias
___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listi
...@external.icw-global.com | www.icw.de | www.lifesensor.com
From:
Nicolas Charles
To:
help-cfengine@cfengine.org
Date:
11.12.2009 11:56
Subject:
Re: Search a file in different locations
Sent by:
help-cfengine-boun...@cfengine.org
Hi,
You could try using a list a files :
vars:
"filel
Hi,
You could try using a list a files :
vars:
"filelist" slist => {"/a/foo", "/b/foo", "/c/foo"};
classes:
"exists" expression => fileexists($(filelist));
Regards,
Nicolas
On Fri, Dec 11, 2009 at 11:39 AM, Matthias Teege wrote:
> Moin,
>
> I can set a class based on the existence of a file w
Moin,
I can set a class based on the existence of a file with fileexists. But
sometimes I have to set a class if a file exists in directory "/a" or
"/b" or "/c". I can use something like this:
"exists_in_a" expression => fileexists("/a/foo");
"exists_in_b" expression => fileexists("/b/foo");
"e