Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default install puts zfs-auto-snapshot.sh in unfindable directory. #47

Open
jgilmore opened this issue Jun 6, 2015 · 4 comments
Open

Comments

@jgilmore
Copy link

jgilmore commented Jun 6, 2015

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...

@didyouexpectthat
Copy link

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: <PATH=/usr/bin:/bin:/usr/sbin:/sbin>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <LOGNAME=root>
Message-Id: 20150607151501.3780A96173@dirty.rotten.soy
Date: Sun, 7 Jun 2015 08:15:01 -0700 (PDT)

/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

@jgilmore
Copy link
Author

jgilmore commented Jun 8, 2015

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.

@vozhyk-
Copy link

vozhyk- commented Dec 19, 2015

Another workaround is installing with

make install PREFIX=/usr

@scottlinux
Copy link

#48
#44

vozhyk- added a commit to vozhyk-/zfs-auto-snapshot that referenced this issue Feb 7, 2016
Change "zfs-auto-snapshot" to the absolute path when installing

Inspired by zfsonlinux#44

Issue zfsonlinux#47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants