btrbk-verify: cleanup

pull/427/head
Axel Burri 2021-09-04 17:15:56 +02:00
parent d554afab10
commit 4234fb2965
1 changed files with 5 additions and 4 deletions

View File

@ -365,8 +365,8 @@ while read -r btrbk_list_line; do
break break
fi fi
source="${R_snapshot_subvolume}" source="${R_snapshot_subvolume}/"
target="${R_target_subvolume}" target="${R_target_subvolume}/"
[[ -n "$R_source_host" ]] && source="${R_source_host}:${source}" [[ -n "$R_source_host" ]] && source="${R_source_host}:${source}"
[[ -n "$R_target_host" ]] && target="${R_target_host}:${target}" [[ -n "$R_target_host" ]] && target="${R_target_host}:${target}"
@ -384,10 +384,11 @@ while read -r btrbk_list_line; do
# rsync rsh is either source_rsh or target_rsh or empty # rsync rsh is either source_rsh or target_rsh or empty
eff_rsh="$R_source_rsh" eff_rsh="$R_source_rsh"
[[ -z "$eff_rsh" ]] && eff_rsh="$R_target_rsh" [[ -z "$eff_rsh" ]] && eff_rsh="$R_target_rsh"
eff_rsh=$(rsync_rsh "$eff_rsh")
rsync_cmd=("rsync" "${rsync_args[@]}") rsync_cmd=("rsync" "${rsync_args[@]}")
[[ -n "$eff_rsh" ]] && rsync_cmd+=(-e "$(rsync_rsh "$eff_rsh")") [[ -n "$eff_rsh" ]] && rsync_cmd+=("-e" "$eff_rsh")
rsync_cmd+=("${source}/" "${target}/") rsync_cmd+=("${source}" "${target}")
log_cmd "${rsync_cmd[@]}" log_cmd "${rsync_cmd[@]}"
[[ -n "$dryrun" ]] && rsync_cmd=("cat" "/dev/null") [[ -n "$dryrun" ]] && rsync_cmd=("cat" "/dev/null")