From ec61905fc4f72ce7b02d10299b7bbe47f3a7a715 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 1 Nov 2009 14:02:50 +0100 Subject: [PATCH] always call $@, which is now setup correctly Signed-off-by: Nico Schottelius --- ccollect.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 163c96e..7747fcc 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -89,15 +89,13 @@ add_name() } # -# Execute on remote host, if backing up to a remote host +# Prepend "ssh ${remote_host}", if backing up to a remote host # pcmd() { - if [ "${remote_host}" ]; then - ssh "${remote_host}" "$@" - else - "$@" - fi + [ "${remote_host}" ] && set -- "ssh" "${remote_host}" "$@" + + "$@" } #