diff options
| author | Alexander Motin <mav@FreeBSD.org> | 2016-02-05 17:28:11 +0000 |
|---|---|---|
| committer | Alexander Motin <mav@FreeBSD.org> | 2016-02-05 17:28:11 +0000 |
| commit | b0fcd5fba2da7b6b37f338f59b97547dd9c97580 (patch) | |
| tree | 45ab6ba75be12c8d73296c905ce37ddf91d19430 /etc | |
| parent | c80429cedb277ccc9626c28a7cf8fafc5a265ff6 (diff) | |
Notes
Diffstat (limited to 'etc')
| -rwxr-xr-x | etc/periodic/daily/800.scrub-zfs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/periodic/daily/800.scrub-zfs b/etc/periodic/daily/800.scrub-zfs index 359be13b227a..b7a009d2c1e9 100755 --- a/etc/periodic/daily/800.scrub-zfs +++ b/etc/periodic/daily/800.scrub-zfs @@ -63,6 +63,11 @@ case "$daily_scrub_zfs_enable" in _last_scrub=$(zpool history ${pool} | \ sed -ne '2s/ .*$//p') fi + if [ -z "${_last_scrub}" ]; then + echo " skipping scrubbing of pool '${pool}':" + echo " can't get last scrubbing date" + continue + fi # Now minus last scrub (both in seconds) converted to days. _scrub_diff=$(expr -e \( $(date +%s) - \ |
