Bug#583716: cron sends mail that command failed

Jörg Sommer joerg at alea.gnuu.de
Sat May 29 23:10:37 UTC 2010


Package: mdadm
Version: 3.0.3-2
Severity: minor

Hi,

since a few weeks I get a mail from cron everytime the job for mdadm
is run that contains this message:

  command failed with exit status 1

I found this message in cron's source code in do_command.c. I think the
fault is that the date match is false and hence the whole command.

[ -x /usr/share/mdadm/checkarray ] && [ $(date +%d) -le 7 ]
  && /usr/share/mdadm/checkarray --cron --all --quiet

I think you should better write:

if [ -x /usr/share/mdadm/checkarray ] && [ $(date +%d) -le 7 ]; then
  /usr/share/mdadm/checkarray --cron --all --quiet; fi

Bye, Jörg.

-- System Information:
Debian Release: unstable/experimental
  APT prefers unstable
  APT policy: (900, 'unstable'), (700, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.34
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature http://en.wikipedia.org/wiki/OpenPGP
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20100530/8c222bc9/attachment.pgp>


More information about the pkg-mdadm-devel mailing list