found 574461 1.1.40 #tags 574461 - moreinfo #hopefully ;) thanks Hi Tiago,
sorry for taking so long to reply.
On Donnerstag, 25. März 2010, Tiago Bortoletto Vaz wrote:
> > My cronjob file just checks if /sbin/apticron exists before running it:
Yes, but this check returns with an error if apticron isn't installed.
Instead, it should end gracefully also in this case.
> > ti...@thinkpad:~/Hacking/apticron$ cat debian/cron.daily
> > #!/bin/sh
> >
> > test -x /usr/sbin/apticron && /usr/sbin/apticron --cron
if [ ! -x /usr/bin/apticron ] ; then exit 0
> > I know I could do it using other methods, but once the current one does
> > what the policy requires and does not send any annoying output, then I
> > need to imagine a situation where this behavior could affect the system.
> > And I can't think in anything for now. So, could you give me an example?
>
> Also note that crontab calls run-parts without "--exit-on-error" parameter.
Yes, but that seems to be the default:
First, as expected:
[...]
Removing apticron ...
Processing triggers for man-db ...
matrix:~# /etc/cron.daily/apticron ; echo $?
1
And now as it's been run by cron:
matrix:~# mkdir /etc/cron.daily/a
matrix:~# mv /etc/cron.daily/apticron /etc/cron.daily/a/
matrix:~# run-parts --report /etc/cron.daily/a/
run-parts: /etc/cron.daily/a//apticron exited with return code 1
matrix:~# run-parts --report /etc/cron.daily/a/ ; echo $?
run-parts: /etc/cron.daily/a//apticron exited with return code 1
1
cheers,
Holger
signature.asc
Description: This is a digitally signed message part.

