Cron script redirection (probably stderr problem ?)

bsd bsd at todoo.biz
Wed Jan 18 01:06:40 PST 2006


Hello,

I am using a little cron script to update my server that calls  
"portsnap". Once this is done there is another piece of script that  
tells me which port(s) is to be updated with a simple call to a  
script that mainly execute portversion -l "<" and mail me the output  
of the command.


There is one little problem with that script :

Cron mails me (root) each time this output (probably because it comes  
from standerr ?) :

> [Updating the portsdb <format:bdb1_btree> in /usr/ports ... - 14011  
> port entries found ......... 
> 1000.........2000.........3000.........4000.........5000.........6000. 
> ........ 
> 7000.........8000.........9000.........10000.........11000.........120 
> 00.........13000.........14000 ..... done]


The cron script is executed as follow :

0 3 * * * /usr/local/sbin/portsnap cron && /usr/local/sbin/portsnap - 
I update && /root/src/upgrade.sh > /var/log/upgrade.log


I've tried to add a 2>&1 at the end of the script :

0 3 * * * /usr/local/sbin/portsnap cron && /usr/local/sbin/portsnap - 
I update && /root/src/upgrade.sh > /var/log/upgrade.log 2>&1


But this does not seem to change my problem.

Any help ?


________________________________________________
«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Gregober ---> PGP ID --> 0x1BA3C2FD
bsd @at@ todoo.biz
________________________________________________
«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯





More information about the freebsd-questions mailing list