diff --git a/letsencrypt-auto-source/letsencrypt-auto b/letsencrypt-auto-source/letsencrypt-auto index 6c5f37e88..2c044b157 100755 --- a/letsencrypt-auto-source/letsencrypt-auto +++ b/letsencrypt-auto-source/letsencrypt-auto @@ -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() { diff --git a/letsencrypt-auto-source/pieces/bootstrappers/rpm_python3_legacy.sh b/letsencrypt-auto-source/pieces/bootstrappers/rpm_python3_legacy.sh index d8baf1d9b..4f48eec04 100644 --- a/letsencrypt-auto-source/pieces/bootstrappers/rpm_python3_legacy.sh +++ b/letsencrypt-auto-source/pieces/bootstrappers/rpm_python3_legacy.sh @@ -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() { diff --git a/letsencrypt-auto-source/tests/centos6_tests.sh b/letsencrypt-auto-source/tests/centos6_tests.sh index 814378be3..c15cd80ec 100644 --- a/letsencrypt-auto-source/tests/centos6_tests.sh +++ b/letsencrypt-auto-source/tests/centos6_tests.sh @@ -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