From 46b5c24cd240cd9006d93cfcc12a4d81b46a5238 Mon Sep 17 00:00:00 2001 From: Ander Punnar Date: Sun, 18 Jul 2021 16:25:00 +0300 Subject: [PATCH] use $__remote_exec for RSYNC_RSH --- cdist/conf/type/__rsync/gencode-local | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cdist/conf/type/__rsync/gencode-local b/cdist/conf/type/__rsync/gencode-local index 612d237e..e9f3c131 100755 --- a/cdist/conf/type/__rsync/gencode-local +++ b/cdist/conf/type/__rsync/gencode-local @@ -90,6 +90,8 @@ fi # 4. to understand how that cryptic regex works, please # open rsync manpage and read about --itemize-changes. +export RSYNC_RSH="$__remote_exec" + # shellcheck disable=SC2086 if ! rsync --dry-run --itemize-changes $options "$src" "$remote_user@$__target_host:$dst" \ | grep -E '^(<|>|c|h|\.|\*)[fdL][cstTpogunbax\.\+\?]+\s' >&2 @@ -97,4 +99,6 @@ then exit 0 fi +echo "export RSYNC_RSH='$__remote_exec'" + echo "rsync $options $src $remote_user@$__target_host:$dst"