From 7ad6bf89061ea3adda9be2b6e7cd757a6716b04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Goran=20Meki=C4=87?= Date: Mon, 24 Apr 2023 21:43:00 +0200 Subject: [PATCH] Set proxy after pkg bootstrap --- scripts/mkjail.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/mkjail.sh b/scripts/mkjail.sh index 4d1dbbd..78b3d9a 100755 --- a/scripts/mkjail.sh +++ b/scripts/mkjail.sh @@ -149,9 +149,9 @@ cp ~/.ssh/id_rsa.pub "${BSDINSTALL_CHROOT}/usr/home/provision/.ssh/authorized_ke chmod 600 "${BSDINSTALL_CHROOT}/usr/home/provision/.ssh/authorized_keys" chown -R 666:666 "${BSDINSTALL_CHROOT}/usr/home/provision/.ssh" env ASSUME_ALWAYS_YES=yes pkg -c "${BSDINSTALL_CHROOT}" bootstrap -f -sed -i "" \ - -e 's;PKG_PROXY;pkg_env : { http_proxy: "http://${PKG_PROXY}" };g' \ - "${SCRIPT_DIR}/../templates/pkg.conf" >"${BSDINSTALL_CHROOT}/usr/local/etc/pkg.conf" +if [ "${PKG_PROXY}" != "no" ]; then + echo "pkg_env : { http_proxy: \"http://${PKG_PROXY}/\" }" >>"${BSDINSTALL_CHROOT}/usr/local/etc/pkg.conf" +fi pkg -c "${BSDINSTALL_CHROOT}" install -y sudo if [ "${DHCP}" = "dhcpcd" ]; then pkg -c "${BSDINSTALL_CHROOT}" install -y dhcpcd