bug fix (wrong recursive filesystem list expansion)

in case of empty filesystem list going for recursive snapshot all
filesystems have been processed
This commit is contained in:
Matus Kral
2013-01-14 10:35:03 +01:00
parent 4bbfa476b1
commit d6c05fb8f4

View File

@ -0,0 +1,27 @@
From e411aba2770469e9c71638be2044b4f57cfc135d Mon Sep 17 00:00:00 2001
From: Matus Kral <matuskral@me.com>
Date: Sun, 13 Jan 2013 02:56:48 +0100
Subject: [PATCH] bug fix (wrong recursive filesystem list expansion)
in case of empty filesystem list going for recursive snapshot all
filesystems have been processed
---
src/zfs-auto-snapshot.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/zfs-auto-snapshot.sh b/src/zfs-auto-snapshot.sh
index 85a23a7..c8bd650 100755
--- a/src/zfs-auto-snapshot.sh
+++ b/src/zfs-auto-snapshot.sh
@@ -901,7 +901,7 @@ test -n "$opt_dry_run" \
# expand FS list if replication is not used
if [ "$opt_recursive" = ' ' -o "$1" = "//" ]
then
- for ii in "${TARGETS_TMP_RECURSIVE[@]}"; do TARGETS_DRECURSIVE=( ${TARGETS_DRECURSIVE[@]} $(printf "%s\n" ${ZFS_LOCAL_LIST[@]} | grep ^$ii) ); done
+ for ii in ${TARGETS_TMP_RECURSIVE[@]}; do TARGETS_DRECURSIVE=( ${TARGETS_DRECURSIVE[@]} $(printf "%s\n" ${ZFS_LOCAL_LIST[@]} | grep ^$ii) ); done
else
TARGETS_DRECURSIVE=( ${TARGETS_TMP_RECURSIVE[@]} )
fi
--
1.7.9.6 (Apple Git-31.1)