...
This commit is contained in:
parent
603684211f
commit
64d6337612
@ -31,7 +31,7 @@ When not specified options apply to all hosts, until the
|
|||||||
first hostname specification is found. Note that the hostname this matches
|
first hostname specification is found. Note that the hostname this matches
|
||||||
against is the hostname used by the remote computer, not the name you pass
|
against is the hostname used by the remote computer, not the name you pass
|
||||||
to SSH to connect to it. If you wish to include the same basic configuration for many
|
to SSH to connect to it. If you wish to include the same basic configuration for many
|
||||||
different hosts, you can do so with the :code:`include` directive (see :doc:`conf`).
|
different hosts, you can do so with the :code:`include` directive (see :doc:`/conf`).
|
||||||
''')
|
''')
|
||||||
|
|
||||||
opt('+copy', '', option_type='copy', add_to_default=False, long_text=f'''
|
opt('+copy', '', option_type='copy', add_to_default=False, long_text=f'''
|
||||||
|
|||||||
@ -4,7 +4,8 @@
|
|||||||
|
|
||||||
# read the transmitted data from STDIN
|
# read the transmitted data from STDIN
|
||||||
cleanup_on_bootstrap_exit() {
|
cleanup_on_bootstrap_exit() {
|
||||||
[ -n "$saved_tty_settings" ] && command stty "$saved_tty_settings" 2> /dev/null
|
[ -n "$saved_tty_settings" ] && command stty "$saved_tty_settings" 2> /dev/null < /dev/tty
|
||||||
|
saved_tty_settings=""
|
||||||
}
|
}
|
||||||
|
|
||||||
die() { printf "\033[31m%s\033[m\n\r" "$*" > /dev/stderr; cleanup_on_bootstrap_exit; exit 1; }
|
die() { printf "\033[31m%s\033[m\n\r" "$*" > /dev/stderr; cleanup_on_bootstrap_exit; exit 1; }
|
||||||
@ -16,7 +17,7 @@ tty_ok="n"
|
|||||||
[ -n "$saved_tty_settings" ] && tty_ok="y"
|
[ -n "$saved_tty_settings" ] && tty_ok="y"
|
||||||
|
|
||||||
if [ "$tty_ok" = "y" ]; then
|
if [ "$tty_ok" = "y" ]; then
|
||||||
command stty raw min 1 time 0 -echo 2> /dev/null < /dev/tty || die "stty not available"
|
command stty raw min 1 time 0 -echo 2> /dev/null < /dev/tty || die "stty failed to set raw mode"
|
||||||
trap 'cleanup_on_bootstrap_exit' EXIT
|
trap 'cleanup_on_bootstrap_exit' EXIT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user