Moved pv_cmd setup.

This commit is contained in:
Otho 2023-01-17 00:05:31 -05:00
parent f7a43122d1
commit 679b6fc1a8
Signed by: Otho
GPG Key ID: 16C720CD3BBE21D9

View File

@ -44,6 +44,7 @@ debug()
run_send_recv()
{
ssh_cmd="ssh $SSH_SEND_OPTS -o port=$port $user@$addr"
pv_cmd="pv -qL ${speed:-$DEFAULT_SPEED}"
if [ $ZB_TEST_MODE = "TRUE" ]; then
echo "$send_cmd | $pv_cmd | $ssh_cmd $recv_cmd"
else
@ -219,7 +220,6 @@ send_latest()
debug "Processing $dset (remote $rset)."
snap1=`get_latest_snapshot $dset`
send_cmd="zfs send $ZFS_SEND_OPTS $dset@$snap1"
pv_cmd="pv -qL ${speed:-$DEFAULT_SPEED}"
recv_cmd="zfs recv $ZFS_RECV_OPTS $zroot$rset"
run_send_recv
done
@ -242,7 +242,6 @@ send_increment()
snap1=`get_latest_snapshot`
snap0=`get_latest_remote_snapshot`
send_cmd="zfs send $ZFS_SEND_OPTS -i $dset@$snap0 $dset@$snap1"
pv_cmd="pv -qL ${speed:-$DEFAULT_SPEED}"
recv_cmd="zfs recv $ZFS_RECV_OPTS $zroot$rset"
run_send_recv
done