Rob Sherwood <[EMAIL PROTECTED]> wrote:

> On Wed, Oct 04, 2006 at 11:37:00AM -0400, J. Milgram wrote:
> > The background: I have a script in /etc/cron.daily that backs up to a 
> > remote server. It was failing and generating stderr messages, but for some 
> > reason Slackware's "run-parts" script executes the scripts in the cron 
> > directories like this:
> > 
> > $SCRIPT 2>&1
> > 
> > so all the "echo foo 1>&2" in the world won't generate any stderr. It was 
> > months before I noticed something was wrong. Was lucky to catch it!
> > 
> > I'm still a Slackware fan but this is apparently broken!
> 
> This is fairly standard: basically stuff that is sent to stdout is usually 
> mailed
> to the owner of the cronjon.  So question: do you have root's mail redirected 
> anywhere
> (i.e., /etc/aliases: root:[EMAIL PROTECTED] )?

Correct, but in the Slack setup there's no cron command output on stdout
or stderr, so no mail, just silent failure.

one solution: in run-parts:

-IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
+IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp .out"
...
-    $SCRIPT 2>&1
+    $SCRIPT > $SCRIPT.out

The sad part is I did this in my setup years ago, but forgot all about
it on a subsequent install, which is why it would be nice if the distro
got it right in the first place.

J.

Reply via email to