File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /bin/bash -e
1+ #! /bin/bash -ex
22
33# create apt sources
44# environment variables:
2626# - if not the same as guest, apply relevant transition changes
2727# - NO_TURNKEY_APT_REPO <optional>:
2828# - disable TurnKey apt repos - useful during early transition
29- # - NO_PROXY <optional>:
30- # - same as APT_PROXY_OVERRIDE=disable (will override APT_PROXY_OVERRIDE
31- # if both set to different values)
3229
3330# Note, to install packages from backports:
3431# - set 'BACKPORTS=y'; and either:
112109
113110if [[ $deb_ver -le 10 ]] && [[ " $distro " == ' debian' ]]; then
114111 sec_repo=" $CODENAME /updates"
115- PROXY_PORT=8124
112+ PROXY_PORT=" $( echo " $FAB_HTTPS_PROXY " | sed -En ' s/.*:([0-9]+).*/\1/p ' ) "
116113elif [[ $deb_ver -ge 11 ]] || [[ " $distro " == ' ubuntu' ]]; then
117114 sec_repo=" $CODENAME -security"
118115 PROXY_PORT=3128
119116fi
120117
121- if [[ " ${APT_PROXY_OVERRIDE,,} " == " disable" ]] || [[ -n " $NO_PROXY " ]] ; then
118+ if [[ " ${APT_PROXY_OVERRIDE,,} " == " disable" ]]; then
122119 PROXY_PORT=
123120elif [[ -n $APT_PROXY_OVERRIDE ]]; then
124121 PROXY_PORT=$APT_PROXY_OVERRIDE
You can’t perform that action at this time.
0 commit comments