„setup.sh“ ändern
bug fixed with sources list
This commit is contained in:
parent
91c47ed997
commit
62c144f253
1 changed files with 7 additions and 5 deletions
12
setup.sh
12
setup.sh
|
@ -88,13 +88,14 @@ then
|
||||||
error
|
error
|
||||||
fi
|
fi
|
||||||
message "check sources.list"
|
message "check sources.list"
|
||||||
if ( ! grep "contrib" /etc/apt/sources.list > /dev/null ) && ( ! grep "non-free" /etc/apt/sources.list > /dev/null )
|
if ! ( ( grep "contrib" /etc/apt/sources.list > /dev/null ) && ( grep -E " non-free( |$)" /etc/apt/sources.list > /dev/null ) )
|
||||||
then
|
then
|
||||||
message warn "'contrib' and 'non-free' not in your sources.ist, i will deploy my own"
|
message warn "I need 'contrib' and 'non-free' in sources.ist, i will deploy my own"
|
||||||
confirm_continue
|
confirm_continue
|
||||||
message "backup old sources.list"
|
message "backup old sources.list to /etc/apt/sources.list.bak"
|
||||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||||
echo "deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
|
cat << EOF > /etc/apt/sources.list
|
||||||
|
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
|
||||||
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
|
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
|
||||||
|
|
||||||
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
|
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
|
||||||
|
@ -104,7 +105,8 @@ deb-src http://security.debian.org/debian-security bookworm-security main contri
|
||||||
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
|
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
|
||||||
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
|
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
|
||||||
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
|
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
|
||||||
" | sudo tee /etc/apt/sources.list
|
EOF
|
||||||
|
|
||||||
message "apt update"
|
message "apt update"
|
||||||
sudo apt update
|
sudo apt update
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue