2019-06-11 14:59:58 +00:00
|
|
|
#!/bin/bash
|
2024-02-07 15:21:14 +00:00
|
|
|
# shellcheck disable=SC1091,SC2312
|
2019-08-14 15:34:54 +00:00
|
|
|
source /installers/config
|
2024-02-07 15:21:14 +00:00
|
|
|
echo "force-unsafe-io" >/etc/dpkg/dpkg.cfg.d/force-unsafe-io
|
2021-04-12 09:12:07 +00:00
|
|
|
|
2021-05-29 20:54:10 +00:00
|
|
|
# We're gonna move the sources to .d/ubuntu.list, then copy it, then manipulate it for a mirror list.
|
2024-02-07 15:21:14 +00:00
|
|
|
#(
|
|
|
|
# cat /etc/apt/sources.list
|
|
|
|
# sed 's/http\:\/\/archive\.ubuntu\.com\/ubuntu\//mirror\:\/\/mirrors.ubuntu.com\/mirrors.txt/g' </etc/apt/sources.list |
|
|
|
|
# sed "s|deb http://security.ubuntu.com|# deb http://security.ubuntu.com|g"
|
|
|
|
#) |
|
|
|
|
# sed '/^#/d' |
|
|
|
|
# sed '/^$/d' \
|
|
|
|
# >/etc/apt/sources.list.d/ubuntu.list
|
|
|
|
#rm /etc/apt/sources.list
|
|
|
|
#touch /etc/apt/sources.list
|
2019-06-11 14:59:58 +00:00
|
|
|
|
2021-08-09 10:36:00 +00:00
|
|
|
# Remove duplicate sources
|
2024-02-07 15:21:14 +00:00
|
|
|
sort /etc/apt/sources.list.d/ubuntu.list | uniq >/etc/apt/sources.list.d/ubuntu.list.uniq
|
2021-08-09 10:36:00 +00:00
|
|
|
mv /etc/apt/sources.list.d/ubuntu.list.uniq /etc/apt/sources.list.d/ubuntu.list
|
|
|
|
|
2019-06-11 14:59:58 +00:00
|
|
|
# Update apt repos
|
|
|
|
apt-get -qq update
|
|
|
|
|
|
|
|
# System upgrade
|
2021-02-16 11:59:40 +00:00
|
|
|
apt-get -yq upgrade
|
2019-07-23 11:37:27 +00:00
|
|
|
|
2020-12-02 11:27:31 +00:00
|
|
|
# Install apt-utils & ca-certificates to prevent some screaming.
|
2024-02-07 15:21:14 +00:00
|
|
|
${APT_GET} ca-certificates
|
|
|
|
${APT_GET} apt apt-utils
|