transporter le code de retour

This commit is contained in:
Jephte CLAIN 2014-05-02 22:44:51 +04:00
parent 6c9b73f542
commit bb608c1382
1 changed files with 3 additions and 1 deletions

4
ussh
View File

@ -163,6 +163,7 @@ function remove_keys() {
}
function do_ssh() {
local r
[ -n "$SSH" ] || SSH=ssh
[ "${#hosts[*]}" -gt 1 ] && showtitle=1 || showtitle=
for host in "${hosts[@]}"; do
@ -174,9 +175,10 @@ function do_ssh() {
fi
[ -n "$showtitle" ] && etitle "${user:+$user@}$host"
"$SSH" "${SSHOPTS[@]}" "${user:+$user@}$host" "$@"
"$SSH" "${SSHOPTS[@]}" "${user:+$user@}$host" "$@" || r=$?
[ -n "$showtitle" ] && eend
done
return "${r:-0}"
}
set_defaults nutools