diff --git a/modules/filesystem/btrfs/btrbk.lib b/modules/filesystem/btrfs/btrbk.lib index 0d3e951..f5cec92 100644 --- a/modules/filesystem/btrfs/btrbk.lib +++ b/modules/filesystem/btrfs/btrbk.lib @@ -73,8 +73,8 @@ for dest in $dests; do for snap in $latest; do # [[ -e $dest/${snap%%.*}.latest ]] && $dry_run_echo sudo rm $dest/${snap%%.*}.latest local cmd="sudo ln -srfn $dest/$snap $dest/${snap%%.*}.latest" -echo $cmd -[[ ! $dry_run ]] && $cmd +echo $cmd +[[ ! $dry_run ]] && $cmd >&2 /dev/null done done diff --git a/modules/utility/copy.func b/modules/utility/copy.lib similarity index 98% rename from modules/utility/copy.func rename to modules/utility/copy.lib index 4d2808b..517d6cc 100644 --- a/modules/utility/copy.func +++ b/modules/utility/copy.lib @@ -186,7 +186,9 @@ EOF else args+=("${@:1}") fi - args+=( "$(remove_end_spaces "-e '$(ssh -l "${sshargs[*]}")'")") + + [[ $DHOST || $SHOST ]] && [[ $sshargs ]] && args+=( "$(remove_end_spaces "-e '$(ssh -l "${sshargs[*]}")'")") + # assemble options [[ ! $exec ]] && args+=(--dry-run -v)