ussh: problèmes de compatibilité
This commit is contained in:
parent
2cc24119b5
commit
2f448d542d
16
ussh
16
ussh
|
@ -343,15 +343,18 @@ function __update_sshopts_cm() {
|
|||
version="$(ssh -V 2>&1)"
|
||||
version="${version#OpenSSH_}"; major="${version%%.*}"
|
||||
minor="${version#$major.}"; minor="${minor:0:1}"
|
||||
if [ $major -ge 6 ]; then
|
||||
if [ -z "$major" ]; then
|
||||
# ne devrait pas se produire... mais au cas où
|
||||
persist=
|
||||
elif [ "$major" -ge 6 ]; then
|
||||
persist="$DEFAULT_PERSIST"
|
||||
elif [ $major -eq 5 ]; then
|
||||
elif [ "$major" -eq 5 ]; then
|
||||
if [ "$minor" -ge 6 ]; then
|
||||
persist="$DEFAULT_PERSIST"
|
||||
else
|
||||
persist=
|
||||
fi
|
||||
elif [ $major -le 4 ]; then
|
||||
elif [ "$major" -le 4 ]; then
|
||||
persist=
|
||||
fi
|
||||
fi
|
||||
|
@ -383,7 +386,10 @@ function show_vars() {
|
|||
function do_ssh() {
|
||||
local -a sshopts
|
||||
local onehost r
|
||||
if [ "${#hosts[*]}" -gt 1 ]; then
|
||||
if [ $# -eq 0 ]; then
|
||||
${exec:+exec} "$SSH" "${SSHOPTS[@]}"
|
||||
return
|
||||
elif [ "${#hosts[*]}" -gt 1 ]; then
|
||||
onehost=
|
||||
exec=
|
||||
else
|
||||
|
@ -447,7 +453,7 @@ if [ -n "$remove" ]; then
|
|||
hosts=("$1"); shift
|
||||
fix_hosts
|
||||
remove_keys
|
||||
else
|
||||
elif [ -n "$1" ]; then
|
||||
hosts=("$1"); shift
|
||||
fix_hosts
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue