When scripts are executed from cron.* directories, the mailed output is mixed up. It is hard to say which output applies to each script. Reproducible: Always Steps to Reproduce: 1.Add some scripts to cron.* dirs which produce output. 2.Wait until cronie executes these scripts. 3.Check mail. Actual Results: Concatenated output of all scripts. Expected Results: Output from various scripts should distinguished. I'm attaching a simple patch solving the problem.
Created attachment 405780 [details, diff] run-crons-script-prefix.patch
Comment on attachment 405780 [details, diff] run-crons-script-prefix.patch rather than prefix each line, should be able to do: $SCRIPT 2>&1 | sed "1i${SCRIPT}:" if script produces no output, then sed won't do anything, but as soon as it produces at least one line, sed will add a header like: /etc/cron.daily/foo: unfortunately though, this now conflicts with bug 491520 where we track the exit status and bug 530416 where we use POSIX shell (so we can't check PIPESTATUS).
*** This bug has been marked as a duplicate of bug 540274 ***