Skip to content

Commit

Permalink
[onboarding] update mirror for old ubuntu versions
Browse files Browse the repository at this point in the history
  • Loading branch information
brettlangdon committed Dec 2, 2024
1 parent d6fd4a9 commit defddb2
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@
if [ -e "$lsb_release" ]; then
if grep -q 'Ubuntu 21.04' "$lsb_release"; then
must_update_repositories="true"
elif grep -q 'Ubuntu 23.10' "$lsb_release"; then
elif grep -q 'Ubuntu 23' "$lsb_release"; then
#Why this works for arm machine but not for amd64?
must_update_repositories="true"
fi
fi
fi
if [ "$must_update_repositories" == "true" ]; then
echo "Configuring archive ubuntu repositories"
sudo sed -i -r 's/ports.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo sed -i -r 's/ubuntu-ports/ubuntu/g' /etc/apt/sources.list
sudo sed -i -r 's|ports.ubuntu.com/ubuntu-ports/|mirror.enzu.com/ubuntu/dists/|g' /etc/apt/sources.list
sudo sed -i -r 's/us-east-1.ec2.//g' /etc/apt/sources.list
echo 'apt_preserve_sources_list: true' | sudo tee -a /etc/cloud/cloud.cfg
sudo apt-get update
Expand Down

0 comments on commit defddb2

Please sign in to comment.