From a1c0d6f0ae0858b2866f9847b7b41f5986a1591f Mon Sep 17 00:00:00 2001 From: Otho Date: Mon, 16 Jan 2023 19:54:26 -0500 Subject: [PATCH] Removed unneeded single quotes. --- backup.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/backup.sh b/backup.sh index 470292b..732cbf1 100755 --- a/backup.sh +++ b/backup.sh @@ -79,7 +79,7 @@ populate_datasets() list_datasets() { for dataset in $SEND_DATASETS; do - dataset=`echo $dataset|cut -d':' -f1` + dataset=`echo $dataset|cut -d: -f1` zfs list -H $dataset done } @@ -96,13 +96,13 @@ list_remote_datasets() { if [ $BG_TEST_MODE = "TRUE" ]; then echo ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr\ "sh -c 'for dataset in $SEND_DATASETS; do - dataset=`echo \\$dataset|cut -d':' -f2` + dataset=`echo \\$dataset|cut -d: -f2` zfs list -H $zroot\$dataset; done'" else ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \ "sh -c 'for dataset in $SEND_DATASETS; do - dataset=`echo \\$dataset|cut -d':' -f2` + dataset=`echo \\$dataset|cut -d: -f2` zfs list -H $zroot\$dataset; done';" fi @@ -130,7 +130,7 @@ get_latest_remote_snapshot() zfs_allow_origin() { for dataset in $SEND_DATASETS; do - dataset=`echo $dataset|cut -d':' -f1` + dataset=`echo $dataset|cut -d: -f1` if [ $BG_TEST_MODE = "TRUE" ]; then echo zfs allow -u $LOCAL_USER $ORIGIN_PERMS $dataset else @@ -152,13 +152,13 @@ zfs_allow_mirrors() if [ $BG_TEST_MODE = "TRUE" ]; then echo ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \ "for dataset in $SEND_DATASETS; do - dataset=`echo \\$dataset|cut -d':' -f2` + dataset=`echo \\$dataset|cut -d: -f2` zfs allow -u $user $MIRROR_PERMS $zroot\$dataset done" else ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \ "for dataset in $SEND_DATASETS; do - dataset=`echo \\$dataset|cut -d':' -f2` + dataset=`echo \\$dataset|cut -d: -f2` zfs allow -u $user $MIRROR_PERMS $zroot\$dataset done" fi @@ -188,8 +188,8 @@ send_latest() esac fi for dataset in $SEND_DATASETS; do - dataset="`echo $dataset|cut -d':' -f1`" - remote_dataset="`echo $dataset|cut -d':' -f2`" + dataset="`echo $dataset|cut -d: -f1`" + remote_dataset="`echo $dataset|cut -d: -f2`" debug "Processing $dataset (remote $remote_dataset)." origin_snapshot=`get_latest_snapshot $dataset` if [ $BG_TEST_MODE = "TRUE" ]; then @@ -219,8 +219,8 @@ send_increment() esac fi for dataset in $SEND_DATASETS; do - dataset="`echo $dataset|cut -d':' -f1`" - remote_dataset="`echo $dataset|cut -d':' -f2`" + dataset="`echo $dataset|cut -d: -f1`" + remote_dataset="`echo $dataset|cut -d: -f2`" origin_snapshot=`get_latest_snapshot` remote_snapshot=`get_latest_remote_snapshot` if [ $BG_TEST_MODE = "TRUE" ]; then