Skip to content

Commit

Permalink
Rename any /etc/apt/sources.list to avoid duplicate warnings
Browse files Browse the repository at this point in the history
This renames /etc/apt/sources.list to /etc/apt/sources.list.dist if it
exists to avoid duplicate warnings when running apt commands.
  • Loading branch information
sagepe committed Dec 5, 2023
1 parent 76ff007 commit 21355ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/install-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
# Debian mirror to use, including contrib and non-free:
Types: deb deb-src
Expand Down
3 changes: 2 additions & 1 deletion shlib/installfns
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
# Debian mirror to use, including contrib and non-free:
Types: deb deb-src
Expand Down

0 comments on commit 21355ac

Please sign in to comment.