Browse Source

new: [base-0k] deactivate security sources that are not anymore supported

``stretch`` doesn't offer anymore a ``stretch/updates`` on http://security.debian.org
pull/43/head
Valentin Lab 3 months ago
parent
commit
23703fa134
  1. 24
      precise/base-0k/hooks/install.d/00-base.sh

24
precise/base-0k/hooks/install.d/00-base.sh

@ -70,7 +70,31 @@ apt:update() {
/etc/apt/sources.list
#s,^(deb(-src)? http://deb.debian.org/debian '"$variant"'),#\1,' \
fi
if [[ " ${tried[*]} " != *" ${variant}-archive-comment-out "* ]] &&
[[ "$failed_fetch" == *" http://archive.debian.org/debian/dists/$variant/"* ]]; then
tried+=("${variant}-archive-comment-out")
[ -z "$backup" ] && {
backup=1
echo "Backup old /etc/apt/sources.list"
cp -v /etc/apt/sources.list{,.myc-update}
}
echo "Applying ${variant}-archive-comment-out"
sed -ri 's,^(deb(-src)? http://archive.debian.org/debian '"$variant"'),#\1,g' \
/etc/apt/sources.list
fi
done
if [[ " ${tried[*]} " != *" ${variant}-security-comment-out "* ]] &&
[[ "$failed_release" == *"'http://security.debian.org $distrib/updates "* ]]; then
tried+=("${distrib}-comment-out")
[ -z "$backup" ] && {
backup=1
echo "Backup old /etc/apt/sources.list"
cp -v /etc/apt/sources.list{,.myc-update}
}
echo "Applying $distrib}-comment-out"
sed -ri 's,^(deb(-src)? http://security.debian.org/ '"$distrib/updates"'),#\1,g' \
/etc/apt/sources.list
fi
done
if [[ " ${tried[*]} " != *" change-release-fix "* ]] &&

Loading…
Cancel
Save