1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00

scripts/ansible: revert to RaspiOS's own /etc/apt/sources.list for 64-bit RaspiOS etc

This commit is contained in:
A Holt 2020-08-25 11:05:12 -04:00 committed by GitHub
parent d609aa6ac5
commit fc2d8827f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,15 +85,16 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian
echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n'
grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error)
fi
if [ -f /etc/rpi-issue ]; then
# 2020-06-06: https://www.raspberrypi.org/forums/viewtopic.php?t=276340
echo -e "\nAdd a mirror to /etc/apt/sources.list if Raspberry Pi OS, which can be flaky..."
mv --no-clobber /etc/apt/sources.list /etc/apt/sources.list.old || true
echo -e "deb http://mirror.us.leaseweb.net/raspbian/raspbian buster main contrib non-free rpi" > /etc/apt/sources.list
echo -e "deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi" >> /etc/apt/sources.list
echo -e "# Uncomment line below then 'apt-get update' to enable 'apt-get source'" >> /etc/apt/sources.list
echo -e "#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi" >> /etc/apt/sources.list
fi
# 2020-08-25: Let's revert to RaspiOS's own /etc/apt/sources.list for 64-bit RaspiOS etc
#if [ -f /etc/rpi-issue ]; then
# # 2020-06-06: https://www.raspberrypi.org/forums/viewtopic.php?t=276340
# echo -e "\nAdd a mirror to /etc/apt/sources.list if Raspberry Pi OS, which can be flaky..."
# mv --no-clobber /etc/apt/sources.list /etc/apt/sources.list.old || true
# echo -e "deb http://mirror.us.leaseweb.net/raspbian/raspbian buster main contrib non-free rpi" > /etc/apt/sources.list
# echo -e "deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi" >> /etc/apt/sources.list
# echo -e "# Uncomment line below then 'apt-get update' to enable 'apt-get source'" >> /etc/apt/sources.list
# echo -e "#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi" >> /etc/apt/sources.list
#fi
echo -e "\napt update; apt install ansible and python3 dependencies explained at:"
echo -e "https://github.com/iiab/iiab/tree/master/scripts/ansible.md\n"
$APT_PATH/apt update