Skip to content

Commit f7aa18f

Browse files
committed
debian-11.sh: Correctly process raspi.list
Signed-off-by: Tobias K <[email protected]>
1 parent b0f86cc commit f7aa18f

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

bin/ncp-dist-upgrade.d/debian-11.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22

33
set -eu -o pipefail
44

5-
if grep -R 'raspberrypi.com' /etc/apt/sources.list* > /dev/null
6-
then
7-
echo "WARN: Raspbian system detected!
8-
There have been errors reported when upgrading from Raspbian which are still being worked on.
9-
Please try this command again in some time."
10-
exit 0
11-
fi
12-
135
new_cfg=/usr/local/etc/ncp-recommended.cfg
146
[[ -f "${new_cfg}" ]] || { echo "Already on the lastest recommended distribution. Abort." >&2; exit 1; }
157

@@ -46,15 +38,16 @@ save_maintenance_mode
4638
# Perform dist-upgrade
4739

4840
apt-get update && apt-get upgrade -y
49-
for aptlist in /etc/apt/sources.list /etc/apt/sources.list.d/php.list /etc/apt/sources.list.d/armbian.list
41+
for aptlist in /etc/apt/sources.list /etc/apt/sources.list.d/{php.list,armbian.list,raspi.list}
5042
do
5143
[ -f "$aptlist" ] && sed -i -e "s/bullseye/bookworm/g" "$aptlist"
5244
done
5345
for aptlist in /etc/apt/sources.list.d/*.list
5446
do
55-
[[ "$aptlist" =~ "/etc/apt/sources.list.d/"(php|armbian)".list" ]] || continue
47+
[[ "$aptlist" =~ "/etc/apt/sources.list.d/"(php|armbian|raspi)".list" ]] || {
5648
echo "Disabling repositories from \"$aptlist\""
5749
sed -i -e "s/deb/#deb/g" "$aptlist"
50+
}
5851
done
5952
apt-get update && apt-get upgrade -y --without-new-pkgs
6053
if is_lxc

0 commit comments

Comments
 (0)