mirror of
https://github.com/YunoHost/install_script.git
synced 2024-09-03 20:06:25 +02:00
Merge 4d579dd94b
into 3e16abd7c4
This commit is contained in:
commit
a48dad7e33
1 changed files with 10 additions and 0 deletions
|
@ -258,6 +258,16 @@ function check_assertions()
|
|||
|
||||
function upgrade_system() {
|
||||
|
||||
# Comment cdrom repository line
|
||||
if grep -E "^deb[[:blank:]]+cdrom:\[Debian.+?stretch[[:blank:]]+main$" /etc/apt/sources.list then
|
||||
sed -i -E "s/^(deb[[:blank:]]+cdrom:\[Debian.+?)stretch[[:blank:]]+main$/\#\1stretch[[:blank:]]main/g" /etc/apt/sources.list
|
||||
fi
|
||||
|
||||
# Add the main repository if it is not already in the sources.list file.
|
||||
if ! grep -E "^deb[[:blank:]]+http://deb.debian.org/debian\/?[[:blank:]]+stretch[[:blank:]]+main$" /etc/apt/sources.list then
|
||||
echo "deb http://deb.debian.org/debian stretch main" >> /etc/apt/sources.list
|
||||
fi
|
||||
|
||||
apt_get_wrapper update \
|
||||
|| return 1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue