Open jgilmore opened 9 years ago
I just found this as well. Getting e-mails from my server.
From: root@dirty.rotten.soy (Cron Daemon)
To: root@dirty.rotten.soy
Subject: Cron root@dirty zfs-auto-snapshot -q -g --label=frequent --keep=4 //
Content-Type: text/plain; charset=UTF-8
X-Cron-Env:
/bin/sh: 1: zfs-auto-snapshot: not found
root@dirty:/etc/cron.d# cat zfs-auto-snapshot PATH="/usr/bin:/bin:/usr/sbin:/sbin"
/15 * * * \ root zfs-auto-snapshot -q -g --label=frequent --keep=4 //
root@dirty:/etc/cron.d# whereis zfs-auto-snapshot zfs-auto-snapshot: /usr/local/sbin/zfs-auto-snapshot
Yep, that's the one. My workaround was: cd /usr/sbin sudo ln -s /usr/local/sbin/zfs-auto-snapshot .
Either the link becomes redundant or is overwritten, either way it's harmless.
Another workaround is installing with
make install PREFIX=/usr
The script is by default placed in /usr/local/sbin, which is not included in the path specified in the included crontab files.
From /etc/cron.d/zfs-auto-snapshot:
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
Either the default install location needs to be changed, or /usr/local/sbin needs to be included in that path...