Control: found -1 1.2.3-1

Hi,

the cronjob no longer emits a message, but still exits with a
(now different) non-zero exit code:

0m45.7s DEBUG: Starting command: ['chroot', '/tmp/piupartss/tmpiehdW0', 
'/etc/cron.daily/zfs-auto-snapshot']
0m45.7s ERROR: Command failed (status=1): ['chroot', 
'/tmp/piupartss/tmpiehdW0', '/etc/cron.daily/zfs-auto-snapshot']


The exitcode of the last command in the script is uses as the exit code
for the script.
Your current approach is like
  false && do_it ; echo $?


You probably want to use cronjobs like this:

# Only call zfs-auto-snapshot if it's available
which zfs-auto-snapshot > /dev/null || exit 0

exec zfs-auto-snapshot --quiet --syslog --label=daily --keep=31 //


Andreas

Reply via email to