Skip to content

Commit

Permalink
review fixes2
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Golaszewski committed Oct 18, 2024
1 parent 95145db commit 1dabf63
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions pkg/cloudinit/scripts/configure-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,23 @@
# Assumptions:
# - runs before install k8s

HTTP_PROXY_FILE="/capi/etc/http-proxy"
HTTPS_PROXY_FILE="/capi/etc/https-proxy"
NO_PROXY_FILE="/capi/etc/no-proxy"
ENVIRONMENT_FILE="/etc/environment"


HTTP_PROXY_FILE="/tmp/capi/etc/http-proxy"
HTTPS_PROXY_FILE="/tmp/capi/etc/https-proxy"
NO_PROXY_FILE="/tmp/capi/etc/no-proxy"
ENVIRONMENT_FILE="/tmp/etc/environment"

if [ -f ${HTTP_PROXY_FILE} ]; then
HTTP_PROXY=$(cat ${HTTP_PROXY_FILE})
echo "http_proxy=${HTTP_PROXY}" >> "${ENVIRONMENT_FILE}"
echo "HTTP_PROXY=${HTTP_PROXY}" >> "${ENVIRONMENT_FILE}"
fi


if [ -f ${HTTPS_PROXY_FILE} ]; then
HTTPS_PROXY=$(cat ${HTTPS_PROXY_FILE})
echo "https_proxy=${HTTPS_PROXY}" >> "${ENVIRONMENT_FILE}"
echo "HTTPS_PROXY=${HTTPS_PROXY}" >> "${ENVIRONMENT_FILE}"
fi


if [ -f ${NO_PROXY_FILE} ]; then
NO_PROXY=$(cat ${NO_PROXY_FILE})
echo "no_proxy=${NO_PROXY}" >> "${ENVIRONMENT_FILE}"
Expand Down

0 comments on commit 1dabf63

Please sign in to comment.