File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ echo "[+] Target name: ${NAME}"
3030
3131
3232echo " [+] Creating new server in rescue mode with a secondary volume..."
33- SERVER=$( SCW_TARGET_ARCH=" $SCW_TARGET_ARCH " SCW_COMMERCIAL_TYPE=" $SCW_COMMERCIAL_TYPE " scw run -d --env=" AUTHORIZED_KEY=${KEY} boot=none INITRD_DROPBEAR=1 INITRD_HTTP_PROXY= ${SCW_GATEWAY_HTTP_PROXY} " --name=" image-writer-${NAME} " " ${VOLUME_SIZE} " )
33+ SERVER=$( SCW_TARGET_ARCH=" $SCW_TARGET_ARCH " SCW_COMMERCIAL_TYPE=" $SCW_COMMERCIAL_TYPE " scw run -d --env=" AUTHORIZED_KEY=${KEY} boot=none INITRD_DROPBEAR=1" --name=" image-writer-${NAME} " " ${VOLUME_SIZE} " )
3434echo " [+] Server created: ${SERVER} "
3535
3636
@@ -44,7 +44,7 @@ if [ -n "${SCW_GATEWAY_HTTP_PROXY}" ]; then
4444 # scw exec "${SERVER}" "echo proxy=${SCW_GATEWAY_HTTP_PROY} >> .curlrc"
4545 (
4646 set +x
47- scw exec " ${SERVER} " " echo http_proxy = ${SCW_GATEWAY_HTTP_PROXY} >> .wgetrc " > /dev/null 2> /dev/null || (echo " Failed to configure HTTP proxy" ; exit 1) || exit 1
47+ scw exec " ${SERVER} " " echo export http_proxy= ${SCW_GATEWAY_HTTP_PROXY} > /proxy-env " > /dev/null 2> /dev/null || (echo " Failed to configure HTTP proxy" ; exit 1) || exit 1
4848 )
4949fi
5050
@@ -56,7 +56,7 @@ echo "[+] /dev/nbd1 formatted in ext4 and mounted on /mnt"
5656
5757
5858echo " [+] Download tarball and write it to /mnt"
59- scw exec " ${SERVER} " " wget -qO - ${URL} | tar -C /mnt/ -xf - && sync"
59+ scw exec " ${SERVER} " " touch /proxy-env; . /proxy-env; wget -qO - ${URL} | tar -C /mnt/ -xf - && sync"
6060echo " [+] Tarball extracted on disk"
6161
6262
You can’t perform that action at this time.
0 commit comments