Skip to content

Commit db67ef4

Browse files
committed
setup: only update apt sources once
1 parent 793c17f commit db67ef4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

setup/pi/setup-teslausb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ function update_package_index () {
421421
# the package index might be in a bad state if setup was previously
422422
# interrupted, so fix it up first
423423
dpkg --configure -a || true
424-
if [ "$(. /etc/os-release && echo "${VERSION_ID:-}")" = "10" ]
424+
if [ "$(. /etc/os-release && echo "${VERSION_ID:-}")" = "10" ] && grep -q 'raspbian\.raspberrypi\.org' /etc/apt/sources.list
425425
then
426426
echo "Updating apt sources for legacy Buster (consider using a more recent image)"
427427
sed -i 's|raspbian.raspberrypi.org|legacy.raspbian.org|g' /etc/apt/sources.list

0 commit comments

Comments
 (0)