Skip to content

Commit

Permalink
Fix bad merge of zfs-auto-snapshot.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelee8 committed Feb 19, 2017
1 parent 7f6178e commit 056f9cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/zfs-auto-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#

# Set the field separator to a literal tab and newline.
IFS="
IFS="
"

# Set default program options.
Expand Down Expand Up @@ -74,7 +74,7 @@ print_usage ()
-v, --verbose Print info messages.
--destroy-only Only destroy older snapshots, do not create new ones.
name Filesystem and volume names, or '//' for all ZFS datasets.
"
"
}


Expand Down Expand Up @@ -174,7 +174,7 @@ do_snapshots () # properties, flags, snapname, oldglob, [targets...]
else
WARNING_COUNT=$(( $WARNING_COUNT + 1 ))
continue
fi
fi
fi

# Retain at most $opt_keep number of old snapshots of this filesystem,
Expand All @@ -191,7 +191,7 @@ do_snapshots () # properties, flags, snapname, oldglob, [targets...]
KEEP=$(( $KEEP - 1 ))
if [ "$KEEP" -le '0' ]
then
if do_run "zfs destroy -d $FLAGS '$jj'"
if do_run "zfs destroy -d $FLAGS '$jj'"
then
DESTRUCTION_COUNT=$(( $DESTRUCTION_COUNT + 1 ))
else
Expand Down Expand Up @@ -297,7 +297,7 @@ do
shift 1
;;
(--sep)
case "$2" in
case "$2" in
([[:alnum:]_.:\ -])
:
;;
Expand Down Expand Up @@ -345,7 +345,7 @@ if [ "$#" -eq '0' ]
then
print_log error "The filesystem argument list is empty."
exit 133
fi
fi

# Count the number of times '//' appears on the command line.
SLASHIES='0'
Expand Down Expand Up @@ -402,7 +402,7 @@ done
ZPOOLS_SCRUBBING=$(echo "$ZPOOL_STATUS" | awk -F ': ' \
'$1 ~ /^ *pool$/ { pool = $2 } ; \
$1 ~ /^ *scan$/ && $2 ~ /scrub in progress/ { print pool }' \
| sort )
| sort )

# Get a list of pools that cannot do a snapshot.
ZPOOLS_NOTREADY=$(echo "$ZPOOL_STATUS" | awk -F ': ' \
Expand Down

0 comments on commit 056f9cd

Please sign in to comment.