Corrections

This commit is contained in:
Adrien Ferrand 2019-09-20 16:41:47 +02:00
parent 7a2a15ab82
commit 1ff005bc29
3 changed files with 16 additions and 17 deletions

View file

@ -480,13 +480,15 @@ BootstrapRpmCommon() {
BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION=1
EnablePython36SCL() {
if "$EXISTS" python3.6 > /dev/null 2> /dev/null; then
return
fi
if ! scl --list 2>/dev/null | grep -q rh-python36; then
return
fi
set +e
# Do nothing if Python 3.6 is already available
"$EXISTS" python3.6 > /dev/null 2> /dev/null && set -e && return
# Do nothing if SCL Python 3.6 is not installed
! scl --list 2>/dev/null | grep -q rh-python36 && set -e && return
# Enable SCL rh-python36
. scl_source enable rh-python36 && set -e
. scl_source enable rh-python36
set -e
}
BootstrapRpmPython3Legacy() {

View file

@ -3,13 +3,15 @@
BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION=1
EnablePython36SCL() {
if "$EXISTS" python3.6 > /dev/null 2> /dev/null; then
return
fi
if ! scl --list 2>/dev/null | grep -q rh-python36; then
return
fi
set +e
# Do nothing if Python 3.6 is already available
"$EXISTS" python3.6 > /dev/null 2> /dev/null && set -e && return
# Do nothing if SCL Python 3.6 is not installed
! scl --list 2>/dev/null | grep -q rh-python36 && set -e && return
# Enable SCL rh-python36
. scl_source enable rh-python36 && set -e
. scl_source enable rh-python36
set -e
}
BootstrapRpmPython3Legacy() {

View file

@ -80,11 +80,6 @@ cp "$LE_AUTO" /tmp/certbot-auto
# So we take the second last line of the output.
version=$(/tmp/certbot-auto --version 2>/dev/null | tee /dev/null | tail -2 | head -1)
if ! echo "$version" | grep -q certbot; then
echo "Invalid certbot version: ${version}"
exit 1
fi
if [ "$version" != "$INITIAL_CERTBOT_VERSION_PY34" ]; then
echo "ERROR: certbot-auto upgraded certbot in a non-interactive shell with --non-interactive flag not set."
exit 1