apt-cache: rewrite all sources https: → http:
This commit is contained in:
parent
af20c7f029
commit
43e733e06a
1 changed files with 3 additions and 9 deletions
|
@ -11,22 +11,16 @@ enable_apt_cache() {
|
||||||
|
|
||||||
# From /etc/os-release - see run.sh
|
# From /etc/os-release - see run.sh
|
||||||
if [[ "${ID}" == "raspbian" ]]; then
|
if [[ "${ID}" == "raspbian" ]]; then
|
||||||
subtask_begin "Patching for Raspbian [ 1 / 2 ]";
|
subtask_begin "Patching for Raspbian";
|
||||||
# HTTPS doesn't allow for our proxy to cache it
|
|
||||||
if [[ -r "/etc/apt/sources.list.d/raspi.list" ]]; then
|
|
||||||
sed -i 's/https:/http:/g' /etc/apt/sources.list.d/raspi.list
|
|
||||||
fi
|
|
||||||
subtask_end "$?";
|
|
||||||
|
|
||||||
subtask_begin "Patching for Raspbian [ 2 / 2 ]";
|
|
||||||
if [[ -e "/etc/apt/sources.list.d/raspi" ]]; then
|
if [[ -e "/etc/apt/sources.list.d/raspi" ]]; then
|
||||||
rm /etc/apt/sources.list.d/raspi;
|
rm /etc/apt/sources.list.d/raspi;
|
||||||
fi
|
fi
|
||||||
subtask_end "$?";
|
subtask_end "$?";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# HTTPS doesn't allow for our proxy to cache it
|
||||||
subtask_begin "Reconfiguring existing apt sources https → http";
|
subtask_begin "Reconfiguring existing apt sources https → http";
|
||||||
sed -i 's/https:\/\//http:\/\//g' /etc/apt/sources.list;
|
sed -i 's/https:/http:/g' /etc/apt/sources.list;
|
||||||
find /etc/apt/sources.list.d/ -type f -iname '*.list' -print0 | xargs -0 -n1 sed -i 's/https:\/\//http:\/\//g';
|
find /etc/apt/sources.list.d/ -type f -iname '*.list' -print0 | xargs -0 -n1 sed -i 's/https:\/\//http:\/\//g';
|
||||||
subtask_end "$?";
|
subtask_end "$?";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue