From 22cc3842a0969899ce50b3686884248e2bdbe93c Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sat, 25 Oct 2014 11:32:07 +0200 Subject: add some useful error messages --- zb-cleanup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zb-cleanup') diff --git a/zb-cleanup b/zb-cleanup index b4cb63b..f0faeac 100755 --- a/zb-cleanup +++ b/zb-cleanup @@ -40,7 +40,7 @@ done |sort -n | while read l ; do if [ "$curtime" -lt "$max_age" ] ; then #too old - zfs destroy "$snapname" + zfs destroy "$snapname" || echo "$0: zfs destroy $snapname failed" >&2 continue fi @@ -52,7 +52,7 @@ done |sort -n | while read l ; do #if it's too dense, delete the closer snapshot if [ $(( ($density*($curtime-$lasttime))/($timenow-$lasttime) )) -lt 100 ] then - zfs destroy "$snapname" + zfs destroy "$snapname" || echo "$0: zfs destroy $snapname failed" >&2 else lasttime="$curtime" fi -- cgit v1.2.3