ne pas corriger localhost
This commit is contained in:
parent
8884953459
commit
abd197b843
12
ussh
12
ussh
|
@ -132,9 +132,13 @@ function remove_keys() {
|
|||
etitle "Suppression des entrées dans ~/.ssh/known_hosts"
|
||||
for host in "${allhosts[@]}"; do
|
||||
splituserhost "$host" user host
|
||||
if [ "${host%.}" != "$host" ]; then
|
||||
if [ "$host" == localhost ]; then
|
||||
: # ne pas corriger localhost
|
||||
elif [ "${host%.}" != "$host" ]; then
|
||||
# si le nom se termine par ., le prendre tel quel
|
||||
host="${host%.}"
|
||||
elif ! [[ "$host" == *.* ]]; then
|
||||
# sinon rajouter le domaine par défaut le cas échéant
|
||||
host="$host${DOMAIN:+.$DOMAIN}"
|
||||
fi
|
||||
|
||||
|
@ -168,9 +172,13 @@ function do_ssh() {
|
|||
[ "${#hosts[*]}" -gt 1 ] && showtitle=1 || showtitle=
|
||||
for host in "${hosts[@]}"; do
|
||||
splituserhost "$host" user host
|
||||
if [ "${host%.}" != "$host" ]; then
|
||||
if [ "$host" == localhost ]; then
|
||||
: # ne pas corriger localhost
|
||||
elif [ "${host%.}" != "$host" ]; then
|
||||
# si le nom se termine par ., le prendre tel quel
|
||||
host="${host%.}"
|
||||
elif ! [[ "$host" == *.* ]]; then
|
||||
# sinon rajouter le domaine par défaut le cas échéant
|
||||
host="$host${DOMAIN:+.$DOMAIN}"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue