On Wed, Aug 08, 2007 at 04:45:16PM +1200, Francois Marier wrote:
> On 2007-08-04 at 16:05:17, Filippo Giunchedi wrote:
> > reported below:
> > REMOVE CRON.DAILY ['/usr/bin/send-reminders not found.\n'] []
> > AUTOREMOVE CRON.DAILY ['/usr/bin/send-reminders not found.\n'] []
> > 
> > you should check that send-reminders is present and executable
> 
> There is a check for that, in fact that "... not found" message comes from
> the check:
> 
>   $ cat /etc/cron.daily/email-reminder 
>   #!/bin/sh
>   SCRIPT=/usr/bin/send-reminders
>   
>   if [ -e "$SCRIPT" -a -x "$SCRIPT" ]; then
>           $SCRIPT
>   else
>           echo "$SCRIPT not found."
>           exit 1;
>   fi
> 
> 
> Should I remove the "else" clause?  I put it there to give a warning to
> admins if the cron job can't find the script...

IMO yes, if the package is installed then there is send-reminders as well, if 
it is
removed then it is not present. 

Note also that -x implies -e, so it is redundant.  I would go for something like
[ -x "$SCRIPT" ] && $SCRIPT
or similar.

filippo
--
Filippo Giunchedi - http://esaurito.net
PGP key: 0x6B79D401
random quote follows:

I always keep the Titanic in mind when I talk about security or
safety, meaning that nothing is fully secure.
-- Anonymous (?)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to