1.4 Evaluated classes
Cfengine provides a number of in-built functions for evaluating classes,
based on file tests. Using these internal functions is quicker than
calling the shell
test function. The time functions place their
arguments in chronological order.
- True if file 2 is modified more recently than file 1. (mtime)
- True if file 1 had its last access earlier than file 2 (atime)
- True if file 1's attributes were changed in any way before file 2's (ctime).
- True if the named file object exists.
- True if the current host lies within the specified range
- True of the named variable is defined. NB:
- True if the named file object is a directory.
- True if the named file object is a symbolic link.
- True if the named file object is a plain file.
- True if the named shell command returns with exit code zero (okay).
- True if the strings match exactly.
access_to_dir = ( ReturnsZero(/bin/cd /mydir) )
compare = ( ChangedBefore(/etc/passwd_master,/etc/passwd) )
isplain = ( IsPlain(/tmp/import) )
inrange = ( IPRange(18.104.22.168-15) )
CIDR = ( IPRange(22.214.171.124/24) )