From 90b696ccadab653c86f450e294b46760809ecfcf Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Sat, 7 Dec 2019 00:00:21 +0100 Subject: [PATCH] Various corrections --- letsencrypt-auto-source/Dockerfile.centos6 | 4 ++-- letsencrypt-auto-source/letsencrypt-auto.template | 4 +++- .../{uname_wrapper => tests/uname_wrapper.sh} | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) rename letsencrypt-auto-source/{uname_wrapper => tests/uname_wrapper.sh} (95%) mode change 100755 => 100644 diff --git a/letsencrypt-auto-source/Dockerfile.centos6 b/letsencrypt-auto-source/Dockerfile.centos6 index 6334c9067..968116515 100644 --- a/letsencrypt-auto-source/Dockerfile.centos6 +++ b/letsencrypt-auto-source/Dockerfile.centos6 @@ -31,9 +31,9 @@ RUN update-ca-trust COPY . /home/lea/certbot/letsencrypt-auto-source # Tweak uname binary for tests on fake 32bits -COPY uname_wrapper /bin +COPY uname_wrapper.sh /bin RUN mv /bin/uname /bin/uname_orig \ - && mv /bin/uname_wrapper /bin/uname + && mv /bin/uname_wrapper.sh /bin/uname USER lea WORKDIR /home/lea diff --git a/letsencrypt-auto-source/letsencrypt-auto.template b/letsencrypt-auto-source/letsencrypt-auto.template index 57391735c..0d6ab0f8b 100755 --- a/letsencrypt-auto-source/letsencrypt-auto.template +++ b/letsencrypt-auto-source/letsencrypt-auto.template @@ -552,7 +552,7 @@ if [ "$1" = "--le-auto-phase2" ]; then # In this situation, we bypass any bootstrap or certbot venv setup. error "Your system is not supported by certbot-auto anymore." - if [ -f "$VENV_BIN/letsencrypt" ]; then + if [ -f "$VENV_BIN/letsencrypt" -a "$INSTALL_ONLY" != 1 ]; then error "Certbot will no longer receive updates." error "Please visit https://certbot.eff.org/ to check for other alternatives." "$VENV_BIN/letsencrypt" "$@" @@ -688,6 +688,8 @@ UNLIKELY_EOF fi if [ "$INSTALL_ONLY" = 1 ]; then + # If you're modifying any of the code after this point in this `if` block, you may + # need to update the "$DEPRECATED_OS" = 1 case at the beginning of phase 2 as well. say "Certbot is installed." exit 0 fi diff --git a/letsencrypt-auto-source/uname_wrapper b/letsencrypt-auto-source/tests/uname_wrapper.sh old mode 100755 new mode 100644 similarity index 95% rename from letsencrypt-auto-source/uname_wrapper rename to letsencrypt-auto-source/tests/uname_wrapper.sh index eda9591a4..df1f568c6 --- a/letsencrypt-auto-source/uname_wrapper +++ b/letsencrypt-auto-source/tests/uname_wrapper.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e uname_output=$(/bin/uname_orig "$@")