On Tue, 14 Apr 2009, Rich Shepard wrote:

>   Quick recap: that shell script lives in /etc/cron.daily/ and 
> worked consistently until recently. In root's crontab is the command 
> to run all scripts in /etc/cron.daily at 04:40am. The three main 
> scripts in that directory are 0logwatch, 1pflogsumm, and logrotate. 
> The first and third run every day as they should. The second one 
> became inconsistent.
>
>   When I stopped getting daily mail log summaries (valued primarily 
> to identify false positive rejections based on overly-broad UCE 
> rules), I added a crontab command to run the script just after 
> midnight each day.
>
>   For a while I was seeing two summary reports in my mail box: the 
> one generated at 00:02am and the one generated at 04:40am. That held 
> all last week; I kept the early one because I'd rather have 2 
> reports than none. Saturday through yesterday, neither report ran. 
> Nor would it run if the script was manually invoked. Strange.

First, if it won't run manually, then you've got a better chance of 
figuring it out. Run it in strace to see if the error is visible:

   strace -o /tmp/pflogsumm.trace /usr/local/bin/pflogsumm

The output of strace is cryptic, but the failure should be visible.

Second, I've seen some new cron namespace restrictions recently. I 
doubt they apply in your case, but I'll alert you anyway, just in 
case.

I assume that the stuff in /etc/cron.daily is launched via a utility 
called run-parts. If so, check the manpage. The new Debian version of 
run-parts places restrictions on the names of scripts that can be run. 
My centrally managed cron scripts all have a .cron filename extension, 
but that violates the new restrictions so they wouldn't run on Debian. 
Wierd.

Third, some versions of run-parts can be run from the command line in 
a test mode and report what programs it thinks it should run, e.g.,

   run-parts --test /etc/cron.daily

Fourth, you can always try putting a bunch of "print STDERR ..." stuff 
in your Perl script to see how far it gets. :-)

-- 
Paul Heinlein <> [email protected] <> www.madboa.com
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to