From 3d9992b0861747d211c5d33d79a6864b800c3698 Mon Sep 17 00:00:00 2001 From: Jonathan Carter Date: Fri, 15 Jun 2018 13:10:29 +0200 Subject: [PATCH] Undo PR#82 (fixes #86 and fixes #87) --- src/zfs-auto-snapshot.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/zfs-auto-snapshot.sh b/src/zfs-auto-snapshot.sh index 2038b5f..a97df0a 100644 --- a/src/zfs-auto-snapshot.sh +++ b/src/zfs-auto-snapshot.sh @@ -367,20 +367,21 @@ fi ZPOOL_STATUS=$(env LC_ALL=C zpool status 2>&1 ) \ || { print_log error "zpool status $?: $ZPOOL_STATUS"; exit 135; } -ZFS_LIST=$(env LC_ALL=C zfs list -r -H -t filesystem,volume -s name \ - -o name,com.sun:auto-snapshot,com.sun:auto-snapshot:"$opt_label" "${@}") \ + +ZFS_LIST=$(env LC_ALL=C zfs list -H -t filesystem,volume -s name \ + -o name,com.sun:auto-snapshot,com.sun:auto-snapshot:"$opt_label") \ || { print_log error "zfs list $?: $ZFS_LIST"; exit 136; } if [ -n "$opt_fast_zfs_list" ] then - SNAPSHOTS_OLD=$(env LC_ALL=C zfs list -r -H -t snapshot -o name -s name "${@}" | \ + SNAPSHOTS_OLD=$(env LC_ALL=C zfs list -H -t snapshot -o name -s name | \ grep $opt_prefix | \ awk '{ print substr( $0, length($0) - 14, length($0) ) " " $0}' | \ sort -r -k1,1 -k2,2 | \ awk '{ print substr( $0, 17, length($0) )}') \ || { print_log error "zfs list $?: $SNAPSHOTS_OLD"; exit 137; } else - SNAPSHOTS_OLD=$(env LC_ALL=C zfs list -r -H -t snapshot -S creation -o name "${@}" ) \ + SNAPSHOTS_OLD=$(env LC_ALL=C zfs list -H -t snapshot -S creation -o name) \ || { print_log error "zfs list $?: $SNAPSHOTS_OLD"; exit 137; } fi