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
signature.asc
Description: OpenPGP digital signature