This fix isn't quite right, because it will try running checkarray even if the checkarray script is not there (e.g. if the package is removed but not purged) or is not executable. In fact, in this case the above version will try running checkarray every sunday, thus generating a weekly "command not found" email---even with older versions of cron that do not send emails on mere nonzero exit status. Better would be:
if [ -x /usr/share/mdadm/checkarray ] && [ $(date +\%d) -le 7 ]; then /usr/share/mdadm/checkarray --cron --all --quiet; fi If either condition is false, nothing is executed and if's exit status is zero. It would also be possible to keep a zero exit status by inverting the first test: [ ! -x /usr/share/mdadm/checkarray ] || [ $(date +\%d) -gt 7 ] || /usr/share/mdadm/checkarray --cron --all --quiet But, although this version is slightly shorter than the one with 'if', I think it is less readable. One shouldn't have to apply de Morgan's laws to figure out when checkarray is going to be called. -- Neil Moore, n...@s-z.org, http://s-z.org/neil/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org