support de UTOOLS_ENSURE_HOSTNAME_SSH_OPTS

This commit is contained in:
Jephté Clain 2013-11-12 13:10:23 +04:00
parent 4bf71eefe5
commit 7c7efb71f1
2 changed files with 3 additions and 2 deletions

View File

@ -1 +1 @@
5 6

View File

@ -1802,6 +1802,7 @@ function check_hostname() {
done done
return 1 return 1
} }
UTOOLS_ENSURE_HOSTNAME_SSH_OPTS=()
function ensure_hostname() { function ensure_hostname() {
# Vérifier si le hostname et le user courant sont l'un des arguments $1..* # Vérifier si le hostname et le user courant sont l'un des arguments $1..*
# Chaque argument est de la forme [user@]host, mais le test ne tient compte que # Chaque argument est de la forme [user@]host, mais le test ne tient compte que
@ -1856,7 +1857,7 @@ function ensure_hostname() {
local cmd local cmd
[ -n "$path" ] && cmd="$(quoted_args cd "$path"); " [ -n "$path" ] && cmd="$(quoted_args cd "$path"); "
cmd="$cmd$(quoted_args "$script" "$@")" cmd="$cmd$(quoted_args "$script" "$@")"
ssh -qt "$user@$host" "$cmd" ssh -qt "${UTOOLS_ENSURE_HOSTNAME_SSH_OPTS[@]}" "$user@$host" "$cmd"
[ $? -eq 255 ] && return 12 [ $? -eq 255 ] && return 12
return 1 return 1
else else