I'm trying to compress files that are older than 7 days using the following config
# logmaint.cf control: logdir = ( /var/log/syslog ) actionsequence = ( files shellcommands ) tidy: $(logdir) pattern=* r=inf age=365 files: $(logdir) filter=logzip r=inf action=compress filters: { logzip Type: "reg" FromMtime: "date(2000,1,1,0,0,0)" ToMtime: "tminus(0,0,7,0,0,0)" ExecRegex: "/usr/bin/file $(this) (.*ASCII.*)" NameRegex: ".*[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" Result: "Type.NameRegex.ExecRegex.Mtime" } ~ If I run this with the action=alert it finds the correct files but the minute I change the action to compress it seg faults. Here is the core dump gdb -c core.15714 GNU gdb Red Hat Linux (6.3.0.0-0.30.1rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu". Core was generated by `cfagent -vnf /masterfiles/inputs/logmaint.cf'. Program terminated with signal 11, Segmentation fault. #0 0x0808b4c3 in ?? () (gdb) file /usr/lib/debug/usr/sbin/cfagent.debug warning: core file may not match specified executable file. Reading symbols from /usr/lib/debug/usr/sbin/cfagent.debug...done. Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) bt #0 CompressFile (file=0xbffe1130 "/var/log/syslog/teulnx02/CROND/cron.info.20050505") at filedir.c:1327 #1 0x0808a46a in CheckExistingFile (cf_findertype=0x80b06bc "", file=0xbffe1130 "/var/log/syslog/teulnx02/CROND/cron.info.20050505", plus=0, minus=1, action=fixall, uidlist=0x0, gidlist=0x0, dstat=0xbffe10d0, ptr=0x937c918, acl_aliases=0x0) at filedir.c:525 #2 0x08089a2f in RecursiveCheck (name=0xbffe21f0 "/var/log/syslog/teulnx02/CROND", plus=0, minus=0, action=compress, uidlist=0x937c9c8, gidlist=0x937c9d8, recurse=-101, rlevel=2, ptr=0x937c918, sb=0xbffe2190) at filedir.c:247 #3 0x08089afb in RecursiveCheck (name=0xbffe32b0 "/var/log/syslog/teulnx02", plus=0, minus=0, action=compress, uidlist=0x937c9c8, gidlist=0x937c9d8, recurse=-100, rlevel=1, ptr=0x937c918, sb=0xbffe3250) at filedir.c:236 #4 0x08089afb in RecursiveCheck (name=0xbfff8a70 "/var/log/syslog", plus=0, minus=0, action=compress, uidlist=0x937c9c8, gidlist=0x937c9d8, recurse=-99, rlevel=0, ptr=0x937c918, sb=0xbffe4710) at filedir.c:236 #5 0x0805889b in CheckFileWrapper (startpath=0xbfff8a70 "/var/log/syslog", vp=0x937c918) at wrapper.c:282 #6 0x08057327 in ExpandWildCardsAndDo (wildpath=0xbffe5820 "", buffer=0xbfff8a70 "/var/log/syslog", function=0x8058520 <CheckFileWrapper>, argptr=0x937c918) at do.c:3414 #7 0x080573af in ExpandWildCardsAndDo (wildpath=0xbffea8d7 "", buffer=0xbfff8a70 "/var/log/syslog", function=0x8058520 <CheckFileWrapper>, argptr=0x937c918) at do.c:3428 #8 0x080573af in ExpandWildCardsAndDo (wildpath=0xbffef984 "/syslog", buffer=0xbfff8a70 "/var/log/syslog", function=0x8058520 <CheckFileWrapper>, argptr=0x937c918) at do.c:3428 #9 0x080573af in ExpandWildCardsAndDo (wildpath=0xbfff4a34 "/log/syslog", buffer=0xbfff8a70 "/var/log/syslog", function=0x8058520 <CheckFileWrapper>, argptr=0x937c918) at do.c:3428 #10 0x08053340 in CheckFiles () at do.c:1544 #11 0x0804d8a3 in DoTree (passes=2, info=0x80a6b2f "") at cfagent.c:1237 #12 0x0804b28e in main (argc=0, argv=0x0) at cfagent.c:182 (gdb) Here is the version of cfengine I am running. This is a RHEL3 (Red Hat Enterprise 3.0 U5) machine. rpm -qa cfengine cfengine-2.1.15-1.1.el3.rf Any help would be great thanks. _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine