zfsonlinux / zfs-auto-snapshot

ZFS Automatic Snapshot Service for Linux
GNU General Public License v2.0
857 stars 245 forks source link

PATH in cron.d doesn't contain $PREFIX #51

Open xmirakulix opened 8 years ago

xmirakulix commented 8 years ago

PATH spec in zfs-auto-snapshot.cron.frequent should contain '/usr/local/sbin' as it is the default installation target in Makefile

With the current definition, cron (on ubuntu server 15.10) just logs: /bin/sh: 1: zfs-auto-snapshot: not found

alatteri commented 7 years ago

Same thing on Centos 7.2.

Combustible commented 7 years ago

Same on Ubuntu 16.04. So that google might redirect people here - with no MTA set up, cron leaves messages in the syslog that look like: (root) CMD (zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)

But without any error messages. I was initially confused why running the command manually worked just fine. Appending /usr/local/sbin to the PATH fixes this problem.

Edit: I see now that this is a frequently reported issue (looks like at least a duplicate of #14 #46 and #47)

hansdg1 commented 7 years ago

This also happened to me. I was running an older version from December 2016. I saw the fix merged per #47 and can confirm this works on Debian Jessie 8.7.

KSDaemon commented 7 years ago

Confirming same problem on Centos 7.x

jbnance commented 6 years ago

Created https://github.com/zfsonlinux/zfs-auto-snapshot/pull/78 to resolve this