[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: crontab



> > I lookd at how smail currently does it: it uses the crontab command to add a
> > crontab for the mail user. However, it doesn't check to see if the mail user
> > already has a crontab. Seems very broken to me.
> 
> Try looking at how exim does it---it adds a crontab for the mail user, but
> does correctly handle the mail user's existing crontab.
> 
> To install it does this:
> 
>                 # Install in crontab for user mail if not there
>                 oldcrontab=$(crontab -u mail -l|tail +4)

This is soooo stupid!  That 4-line header doesn't exist in the actual
file and shouldn't be dumped out.  I tried to convince the cron
maintainer to dump the header to stderr and the data to stdout but he
decided not to.

Perhaps if others also think the current way is bad (what happens if the
header changes length?), we can convince the cron maintainer otherwise.

                                          Brian
                                 ( bcwhite@verisim.com )

-------------------------------------------------------------------------------
 Generated by Signify v1.03.  For this and more, visit http://www.verisim.com/



Reply to: