externalise in libs: dump_key_buffer and set_system_proxy

This commit is contained in:
levasseur
2021-10-08 17:16:02 +02:00
parent 31a2d2bce8
commit a5975307dd
3 changed files with 30 additions and 7 deletions

10
init.sh
View File

@@ -86,6 +86,7 @@ read_commandline $@
# (--help and --version are allowed as unprivileged user)
check_root
# ------------------------------------------------------------------------------
# Logfile variable treatment -- cannot be a function
if [[ -n $NEW_LOGFILE ]]; then
@@ -113,6 +114,7 @@ else
fi
# -- Cannot be a function ends here
# ------------------------------------------------------------------------------
load_autoconf
@@ -120,11 +122,7 @@ load_configuration
process_commandline_and_vars
# Declare proxy system vars if needed and if not already declared
if [[ -n $PROXYSRV && -n $PROXYSRVPORT && -z $NO_PROXY ]]; then
export http_proxy=${http_proxy:-"http://$PROXYSRV:$PROXYSRVPORT/"}
export https_proxy=${https_proxy:-"http://$PROXYSRV:$PROXYSRVPORT/"}
fi
set_system_proxy
# Reinit stage file if no resuming
if [[ $RESUME != true ]]; then
@@ -203,7 +201,7 @@ fi
echo -e "${BYellow}Si vous continuez après cette étape le système sera modifié !${DEFAULTCOL}"
echo
while read -r -t 0.001; do :; done # Dump the buffer
dump_key_buffer
read -n 1 -rsp $"Appuyer sur la touche <C> pour continuer ou une autre pour s'arrêter..." key
echo