[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FileExists bug
From: |
Martin A. Brooks |
Subject: |
FileExists bug |
Date: |
Thu, 27 Nov 2003 11:53:53 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 |
Hi
We've found what appears to be a bug with cfengine 2.1.0p1 and FileExists.
We were trying to do this:
groups:
HashBash = ( FileExists(/usr/local/bin/bash) )
shellcommands:
!HasBash::
"/run/some/script.sh"
Regardless of whether the file existed or not, script.sh was always
being executed.
We tried a lot of different methods for defining and negating the class
but eventually we found that the only way to get it to work was to not
use FileExists. Instead we are now using:
HasBash = ( '/bin/test -e /usr/local/bin/bash' )
This works as we expected the FileExists version to, which implies a bug
with the FileExists function. The operating system is FreeBSD 4.9 on
the server and FreeBSD 4.7 on the clients.
If you need more information, please let me know.
Regards
Martin A. Brooks.
- FileExists bug,
Martin A. Brooks <=