mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-09 14:42:01 -03:30
debian-11.sh: Correctly process raspi.list
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
b0f86cc26f
commit
f7aa18f541
@ -2,14 +2,6 @@
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
if grep -R 'raspberrypi.com' /etc/apt/sources.list* > /dev/null
|
||||
then
|
||||
echo "WARN: Raspbian system detected!
|
||||
There have been errors reported when upgrading from Raspbian which are still being worked on.
|
||||
Please try this command again in some time."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
new_cfg=/usr/local/etc/ncp-recommended.cfg
|
||||
[[ -f "${new_cfg}" ]] || { echo "Already on the lastest recommended distribution. Abort." >&2; exit 1; }
|
||||
|
||||
@ -46,15 +38,16 @@ save_maintenance_mode
|
||||
# Perform dist-upgrade
|
||||
|
||||
apt-get update && apt-get upgrade -y
|
||||
for aptlist in /etc/apt/sources.list /etc/apt/sources.list.d/php.list /etc/apt/sources.list.d/armbian.list
|
||||
for aptlist in /etc/apt/sources.list /etc/apt/sources.list.d/{php.list,armbian.list,raspi.list}
|
||||
do
|
||||
[ -f "$aptlist" ] && sed -i -e "s/bullseye/bookworm/g" "$aptlist"
|
||||
done
|
||||
for aptlist in /etc/apt/sources.list.d/*.list
|
||||
do
|
||||
[[ "$aptlist" =~ "/etc/apt/sources.list.d/"(php|armbian)".list" ]] || continue
|
||||
[[ "$aptlist" =~ "/etc/apt/sources.list.d/"(php|armbian|raspi)".list" ]] || {
|
||||
echo "Disabling repositories from \"$aptlist\""
|
||||
sed -i -e "s/deb/#deb/g" "$aptlist"
|
||||
}
|
||||
done
|
||||
apt-get update && apt-get upgrade -y --without-new-pkgs
|
||||
if is_lxc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user