Skip to content
Snippets Groups Projects
Commit 9fe6ebf3 authored by rhatto's avatar rhatto
Browse files

RSYNC_RSH fix

parent 7ef6a0b8
No related branches found
No related tags found
No related merge requests found
...@@ -279,7 +279,8 @@ function eval_config { ...@@ -279,7 +279,8 @@ function eval_config {
nice="" nice=""
fi fi
ssh_cmd="ssh -T -o PasswordAuthentication=no -o Hostname=$host -p $port -l $user -i $id_file" ssh_cmd_base="ssh -T -o PasswordAuthentication=no -o Hostname=$host -p $port -l $user -i $id_file"
ssh_cmd="$ssh_cmd_base $user@$host"
if [ "$from" == "remote" ] || [ "$dest" == "remote" ]; then if [ "$from" == "remote" ] || [ "$dest" == "remote" ]; then
if [ "$testconnect" == "yes" ] && [ "$protocol" == "ssh" ]; then if [ "$testconnect" == "yes" ] && [ "$protocol" == "ssh" ]; then
...@@ -911,9 +912,9 @@ function set_rsync_options { ...@@ -911,9 +912,9 @@ function set_rsync_options {
fatal "SSH Identity file $id_file not found" fatal "SSH Identity file $id_file not found"
exit 1 exit 1
else else
debug RSYNC_RSH=\"$ssh_cmd\" debug RSYNC_RSH=\"$ssh_cmd_base\"
echo RSYNC_RSH=\"$ssh_cmd\" >> $log echo RSYNC_RSH=\"$ssh_cmd_base\" >> $log
export RSYNC_RSH="$ssh_cmd" export RSYNC_RSH="$ssh_cmd_base"
fi fi
fi fi
...@@ -1062,7 +1063,7 @@ for SECTION in $include; do ...@@ -1062,7 +1063,7 @@ for SECTION in $include; do
info "Syncing $SECTION on $dest_path..." info "Syncing $SECTION on $dest_path..."
debug $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path debug $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path
$nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path >> $log $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path | tee -a $log
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
warning "Rsync error when trying to transfer $SECTION" warning "Rsync error when trying to transfer $SECTION"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment