[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
variables in FileExists
From: |
Eric Sorenson |
Subject: |
variables in FileExists |
Date: |
Fri, 25 Jul 2003 14:16:41 -0700 (PDT) |
Hi, I'd like to be able to do this:
groups:
myconfig = ( FileExists($(cfdir)/$(host).conf) )
So that later on, this would work:
import:
myconfig:: $(cfdir)/$(host).conf
If I just try to import $(host).conf and it doesn't exist, cfengine
croaks. But I guess variables can't be used in FileExists:
cf::/[..]/cfgroups.conf:19: Wildcards cannot be used in this context:
I would prefer to use FileExists instead of 'test -f' because the
'test' binary lives in different places on linux and solaris, /usr/bin
vs /bin, and that gets ugly quick.
I seem to recall a post a while back about safely importing
host-specific files but I can't find it in the archives now. If you've
got a setup like this, how did you solve this problem?
Mark -- is it reasonably easy to change cfengine to allow variable expansion
in FileExists?
--
Eric Sorenson - EXPLOSIVE Networking - http://explosive.net
- variables in FileExists,
Eric Sorenson <=