Update upgrade_debian_10_to_11.sh
This commit is contained in:
parent
6abadfc841
commit
ec3a51695c
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue