From 9e8a2a3e0cee1de0803763b031d957fd214fd1ed Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Wed, 15 Sep 2021 14:42:05 +0200 Subject: [PATCH] added no proxy command line option --- init.sh | 2 +- lib/support.sh | 2 ++ lib/zzz_main_fct.sh | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 30b977c..c454dcf 100755 --- a/init.sh +++ b/init.sh @@ -106,7 +106,7 @@ load_configuration process_commandline_and_vars # Declare proxy system vars if needed and if not already declared -if [[ -n $PROXYSRV && -n $PROXYSRVPORT ]]; then +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 diff --git a/lib/support.sh b/lib/support.sh index e3969ec..8123597 100644 --- a/lib/support.sh +++ b/lib/support.sh @@ -33,6 +33,8 @@ Options : -k, --keep-going Continue l'execution en cas d'erreur. -r, --resume Reprend l'execution là ou elle s'est arrêté. -R, --no-root-check Ne pas vérifier les droits root (ou UID 0) + -P, --no-proxy Ne pas utiliser de proxy lors de l'utilisation de + ce script (n'empêche pas leur configuration via modules) -h, --help Affiche ce texte d'aide. -l, --logfile Nom du fichier de log. Peut aussi être changé via la variable d'environnement LOGFILE. diff --git a/lib/zzz_main_fct.sh b/lib/zzz_main_fct.sh index 4c613dc..fb9cc3c 100644 --- a/lib/zzz_main_fct.sh +++ b/lib/zzz_main_fct.sh @@ -59,6 +59,9 @@ read_commandline() "-R"|"--no-root-check") export NO_ROOT_CHECK=true ;; + "-P"|"--no-proxy") + export NO_PROXY=true + ;; "-l"|"--logfile") local want_logfile=true ;;