[Pkg-zfsonlinux-devel] Bug#946748: [zfsutils-linux] /etc/cron.d/zfsutils-linux leads to false error mails with systemd-cron
Richard Laager
rlaager at wiktel.com
Mon Dec 16 20:44:21 GMT 2019
On 12/15/19 2:09 AM, Dirk Heinrichs wrote:
> [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/scrub ] &&
> /usr/lib/zfs-linux/scrub
>
> This first test of course always fails except on Sundays, leading to a
> non-zero exit code, which triggers systemd-cron's (correct) behaviour
> to send an error mail.
>
> This doesn't happen if the entire command is rewritten as
>
> if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/scrub ]; then
> /usr/lib/zfs-linux/scrub; fi
As that guy who wrote it originally, I agree that is a proper
correction. This would be in line with what mdadm does (at least now).
--
Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-zfsonlinux-devel/attachments/20191216/2fe06d0f/attachment-0001.sig>
More information about the Pkg-zfsonlinux-devel
mailing list