diff --git a/system/upgrade_debian_10_to_11.sh b/system/upgrade_debian_10_to_11.sh index fcdd4f1..49c8cf2 100644 --- a/system/upgrade_debian_10_to_11.sh +++ b/system/upgrade_debian_10_to_11.sh @@ -31,6 +31,12 @@ sed -i 's/buster-security/bullseye-security/g' /etc/apt/sources.list find /etc/apt/sources.list.d/ -type f -name "*.list" -exec sed -i 's/buster/bullseye/g' {} + find /etc/apt/sources.list.d/ -type f -name "*.list" -exec sed -i 's/buster-security/bullseye-security/g' {} + +# Check and replace specific security entry in sources.list +if grep -q "deb http://security.debian.org bullseye/updates main contrib" /etc/apt/sources.list; then + sed -i 's|deb http://security.debian.org bullseye/updates main contrib|deb http://security.debian.org/debian-security bullseye-security main contrib non-free|' /etc/apt/sources.list + echo -e "${YELLOW}Updated security repository entry in sources.list.${NC}" +fi + # Update APT cache and perform upgrade echo -e "${BLUE}Updating package lists...${NC}" apt update