From 9148d3c1fd9ff062566790ea2e42db28dfc7bd75 Mon Sep 17 00:00:00 2001 From: Bohan Yang Date: Sat, 30 Oct 2021 22:25:37 +0800 Subject: [PATCH] Add reuse proxy --- README.md | 1 + debi.sh | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 248c4a8..6d8b643 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ Otherwise, you can run this command to revert all changes made by the script: * `--daily-d-i` Use latest daily build of d-i (Debian Installer) for the unreleased version: 12 (bookworm), sid (unstable) * `--mirror-protocol http` or `https` or `ftp` * `--https` alias to `--mirror-protocol https` + * `--reuse-proxy` Reuse the value of `http(s)_proxy` environment variable as the mirror proxy * `--proxy, --mirror-proxy` Set an HTTP proxy for APT and downloads * `--mirror-host deb.debian.org` * `--mirror-directory /debian` diff --git a/debi.sh b/debi.sh index 1127429..14becc2 100755 --- a/debi.sh +++ b/debi.sh @@ -306,6 +306,9 @@ while [ $# -gt 0 ]; do mirror_proxy=$2 shift ;; + --reuse-proxy) + set_mirror_proxy + ;; --security-repository) security_repository=$2 shift @@ -531,8 +534,6 @@ EOF echo 'd-i network-console/start select Continue' | $save_preseed } -set_mirror_proxy - $save_preseed << EOF # Mirror settings