From 21355ac7c210d6fd1b2fda8ed1fd5b4eae10b2f9 Mon Sep 17 00:00:00 2001 From: Sam Pearson Date: Tue, 5 Dec 2023 08:47:52 +0000 Subject: [PATCH] Rename any /etc/apt/sources.list to avoid duplicate warnings This renames /etc/apt/sources.list to /etc/apt/sources.list.dist if it exists to avoid duplicate warnings when running apt commands. --- bin/install-site.sh | 3 ++- shlib/installfns | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/install-site.sh b/bin/install-site.sh index 7332d6e..82885c7 100755 --- a/bin/install-site.sh +++ b/bin/install-site.sh @@ -157,7 +157,8 @@ update_apt_sources() { notice_msg "Unsupported distribution and version combination $DISTRIBUTION $DISTVERSION" ;; esac - # Install the basic packages we require: + # Install the basic packages we require, backing up any old sources.list + [ -f /etc/apt/sources.list ] && mv /etc/apt/sources.list /etc/apt/sources.list.dist cat > /etc/apt/sources.list.d/debian.sources < /etc/apt/sources.list.d/debian.sources <