From 31b9dc01eb871055de006a3fb94fdaea2059966a Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 2 Oct 2024 03:32:13 +0200 Subject: Clarify comment on exit code override to workaround overlapping codes The framework expects to be able to ignore specific exit codes from the plugins, but if we are possibly returning exit codes from different tools, then it's hard to untangle what tool generated which exit code. In the plugins at hand the exit code 1 seems like a safe one, given both curl and rsync usage, so we currently turn any OpenPGP verification error into that. --- plugins/curl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/curl') diff --git a/plugins/curl b/plugins/curl index b9dd2cb..29c0ace 100755 --- a/plugins/curl +++ b/plugins/curl @@ -15,7 +15,8 @@ if [ "${SIGURL}" ]; then curl -fRz "./current" -m 300 ${CURL_OPTIONS} -o new.sig "${SIGURL}" -o new "${URL}" [ -e new ] || exit 0 gpgv --keyring "${KEYRING}" --status-fd 2 new.sig new || exit 1 - # return 1 because it's not clear what other codes may used + # return 1 because it's not clear what other codes may be safe to + # use that do not overlap with codes from curl. else curl -fRz "./current" -m 300 ${CURL_OPTIONS} -o new "${URL}" fi -- cgit v1.2.3