From f904fb32d7b1e6f987da1015efb06781f51b7ec1 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Mon, 5 Dec 2022 13:05:00 +0100 Subject: [PATCH] move PROXY setting before activating network --- usr/lib/archboot/installer/network.sh | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/usr/lib/archboot/installer/network.sh b/usr/lib/archboot/installer/network.sh index 49c38fa05..9f9ae1a72 100644 --- a/usr/lib/archboot/installer/network.sh +++ b/usr/lib/archboot/installer/network.sh @@ -107,7 +107,20 @@ donetwork() { DIALOG --inputbox "Enter your DNS server IP:" 7 40 "192.168.1.1" 2>"${ANSWER}" || return 1 DNS=$(cat "${ANSWER}") fi - DIALOG --yesno "Are these settings correct?\n\nInterface: ${INTERFACE}\nConnection: ${CONNECTION}\nESSID: ${WLAN_ESSID}\nHidden: ${WLAN_HIDDEN}\nEncryption: ${WLAN_SECURITY}\nKey: ${WLAN_KEY}\ndhcp or static: ${IP}\nIP address: ${IPADDR}\nGateway: ${GW}\nDNS server: ${DNS}" 0 0 + # http/ftp proxy settings + DIALOG --inputbox "Enter your proxy server, for example:\nhttp://name:port\nhttp://ip:port\nhttp://username:password@ip:port\n\n Leave the field empty if no proxy is needed to install." 13 65 "" 2>"${ANSWER}" || return 1 + PROXY=$(cat "${ANSWER}") + PROXIES="http_proxy https_proxy ftp_proxy rsync_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY" + if [[ "${PROXY}" = "" ]]; then + for i in ${PROXIES}; do + unset "${i}" + done + else + for i in ${PROXIES}; do + export "${i}"="${PROXY}" + done + fi + DIALOG --yesno "Are these settings correct?\n\nInterface: ${INTERFACE}\nConnection: ${CONNECTION}\nESSID: ${WLAN_ESSID}\nHidden: ${WLAN_HIDDEN}\nEncryption: ${WLAN_SECURITY}\nKey: ${WLAN_KEY}\ndhcp or static: ${IP}\nIP address: ${IPADDR}\nGateway: ${GW}\nDNS server: ${DNS}\nProxy setting: ${PROXY}" 0 0 case $? in 1) ;; 0) NETPARAMETERS="1" ;; @@ -155,19 +168,6 @@ donetwork() { DIALOG --infobox "Link is up. Continuing in 3 seconds ..." 3 60 sleep 3 fi - # http/ftp proxy settings - DIALOG --inputbox "Enter your proxy server, for example:\nhttp://name:port\nhttp://ip:port\nhttp://username:password@ip:port\n\n Leave the field empty if no proxy is needed to install." 13 65 "" 2>"${ANSWER}" || return 1 - PROXY=$(cat "${ANSWER}") - PROXIES="http_proxy https_proxy ftp_proxy rsync_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY" - if [[ "${PROXY}" = "" ]]; then - for i in ${PROXIES}; do - unset "${i}" - done - else - for i in ${PROXIES}; do - export "${i}"="${PROXY}" - done - fi NEXTITEM="2" S_NET=1 }