mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:22 +02:00
Give the user some warning before enabling backports
This commit is contained in:
@@ -38,11 +38,20 @@ AUGVERSION=`apt-cache show --no-all-versions libaugeas0 | grep ^Version: | cut -
|
||||
if dpkg --compare-version 1.0 gt "$AUGVERSION" ; then
|
||||
if lsb_release -a | grep -q wheezy ; then
|
||||
if ! grep -v -e ' *#' /etc/apt/sources.list | grep -q wheezy-backports ; then
|
||||
# XXX ask for permission before doing this?
|
||||
echo Installing augeas from wheezy-backports...
|
||||
echo deb http://http.debian.net/debian wheezy-backports main >> /etc/apt/sources.list
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends -t wheezy-backports libaugeas0
|
||||
# This can theoretically error if sources.list.d is empty, but in that case we don't care.
|
||||
if ! grep -v -e ' *#' /etc/apt/sources.list.d/* | grep -q wheezy-backports 2>/dev/null ; then
|
||||
echo -n "Installing libaugeas0 from wheezy-backports in 3 seconds..."
|
||||
sleep 1s
|
||||
echo -e "\e[0K\rInstalling libaugeas0 from wheezy-backports in 2 seconds..."
|
||||
sleep 1s
|
||||
echo -e "\e[0K\rInstalling libaugeas0 from wheezy-backports in 1 second ..."
|
||||
sleep 1s
|
||||
echo '(Backports are only installed if explicitly requested via "apt-get install -t wheezy-backports")'
|
||||
|
||||
echo deb http://http.debian.net/debian wheezy-backports main >> /etc/apt/sources.list.d/wheezy-backports.list
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends -t wheezy-backports libaugeas0
|
||||
fi
|
||||
fi
|
||||
augeas_pkg=
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user