1
0
mirror of synced 2026-04-25 20:11:20 +00:00

Use configured apt_proxy in guests.

This commit is contained in:
Alex Tomlins
2011-03-31 09:39:39 +01:00
parent 47c146e173
commit b0bae98746
6 changed files with 32 additions and 16 deletions

View File

@@ -32,9 +32,12 @@ logMessage Script $0 starting
# replicate that setup in our new guest via apt-config dump and save
# the setting to the proxy guess file.
#
logMessage The use of a proxy detected.
apt-config dump | grep -i Acquire::HTTP::Proxy \
> ${prefix}/etc/apt/apt.conf.d/proxy-guess
if [ ${apt_proxy} ]; then
echo "Acquire::http::Proxy \"${apt_proxy}\";" > ${prefix}/etc/apt/apt.conf.d/01proxy
else
logMessage The use of a proxy detected.
apt-config dump | grep -i Acquire::HTTP::Proxy > ${prefix}/etc/apt/apt.conf.d/01proxy
fi
#