Skip to content

Commit 1104cba

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents b0a6a87 + 62f5f7d commit 1104cba

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/zfs-auto-snapshot.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ do_snapshots () # properties, flags, snapname, oldglob, [targets...]
191191
KEEP=$(( $KEEP - 1 ))
192192
if [ "$KEEP" -le '0' ]
193193
then
194-
if do_run "zfs destroy $FLAGS '$jj'"
194+
if do_run "zfs destroy -d $FLAGS '$jj'"
195195
then
196196
DESTRUCTION_COUNT=$(( $DESTRUCTION_COUNT + 1 ))
197197
else
@@ -373,7 +373,11 @@ ZFS_LIST=$(env LC_ALL=C zfs list -H -t filesystem,volume -s name \
373373

374374
if [ -n "$opt_fast_zfs_list" ]
375375
then
376-
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) )}') \
376+
SNAPSHOTS_OLD=$(env LC_ALL=C zfs list -H -t snapshot -o name -s name | \
377+
grep $opt_prefix | \
378+
awk '{ print substr( $0, length($0) - 14, length($0) ) " " $0}' | \
379+
sort -r -k1,1 -k2,2 | \
380+
awk '{ print substr( $0, 17, length($0) )}') \
377381
|| { print_log error "zfs list $?: $SNAPSHOTS_OLD"; exit 137; }
378382
else
379383
SNAPSHOTS_OLD=$(env LC_ALL=C zfs list -H -t snapshot -S creation -o name) \

0 commit comments

Comments
 (0)