Fixed order of operation.

This commit is contained in:
Otho 2023-01-16 21:28:42 -05:00
parent 6ecc55fb6c
commit 6abf246f8d
Signed by: Otho
GPG Key ID: 16C720CD3BBE21D9

View File

@ -24,10 +24,6 @@ SSH_SEND_OPTS="-Ti ~/.ssh/id_rsa"
DEF_SPEED="20M"
read LOCAL_HOST LOCAL_USER LOCAL_PORT LOCAL_TZ SEND_COMPRESSED < $nodes_file
case $SEND_COMPRESSED in
[tTyY]*) ZFS_SEND_OPTS="$ZFS_SEND_OPTS -c"
debug "Enabled send as compressed datasets." ;;
esac
ORIGIN_PERMS="send,snapshot,hold"
MIRROR_PERMS="compression,receive,create,mount,mountpoint,readonly,jailed"
@ -42,6 +38,13 @@ debug()
fi
}
set_compression() {
case $SEND_COMPRESSED in
[tTyY]*) ZFS_SEND_OPTS="$ZFS_SEND_OPTS -c"
debug "Enabled send as compressed datasets." ;;
esac
}
populate_datasets()
{
while read dataset dataset_options; do
@ -272,6 +275,7 @@ done
tail -n +2 $nodes_file|grep -v '^#' > sendnodes.tmp
set_compression
populate_datasets
### Command