On 2/13/06, John van Zantvoort <[EMAIL PROTECTED]> wrote:
> I'd like to test for a files mtime to define a class so if e.g. the
> /var/lib/slocate/slocate.db file is more then 4 days of define the class
> run_updatedb. but I've not been able to find such a function within
> cfengine.
>
This is kind of a long way to do it, but it should work
--
control:
agedfiles = ( ExecResult(/usr/bin/find ${path_to_files} -ctime
+${maximumage}) )
classes:
filesareold = (Strcmp(${agedfiles},"") )
alerts:
filesareold::
"Warning: ${path_to_files} are older than ${maximumage}"
--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--
_______________________________________________
Help-cfengine mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cfengine