mirror of
https://github.com/actions/runner-images.git
synced 2025-12-12 20:26:49 +00:00
* [ubuntu] Cleanup bash scripts * Fix ms-repos lsb_release * Fix install-bicep url * Fix install-nvm
17 lines
834 B
Bash
17 lines
834 B
Bash
#!/bin/bash -e
|
|
################################################################################
|
|
## File: configure-apt-sources.sh
|
|
## Desc: Configure apt sources with failover from Azure to Ubuntu archives.
|
|
################################################################################
|
|
|
|
touch /etc/apt/apt-mirrors.txt
|
|
|
|
printf "http://azure.archive.ubuntu.com/ubuntu/\tpriority:1\n" | tee -a /etc/apt/apt-mirrors.txt
|
|
printf "http://archive.ubuntu.com/ubuntu/\tpriority:2\n" | tee -a /etc/apt/apt-mirrors.txt
|
|
printf "http://security.ubuntu.com/ubuntu/\tpriority:3\n" | tee -a /etc/apt/apt-mirrors.txt
|
|
|
|
sed -i 's/http:\/\/azure.archive.ubuntu.com\/ubuntu\//mirror+file:\/etc\/apt\/apt-mirrors.txt/' /etc/apt/sources.list
|
|
|
|
# Apt changes to survive Cloud Init
|
|
cp -f /etc/apt/sources.list /etc/cloud/templates/sources.list.ubuntu.tmpl
|