From b0d717c72fffda0f83a2273153dd10462965f16a Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Fri, 16 Jul 2021 15:43:05 +0200 Subject: [PATCH] plugin-caller: make no-ops always successful proxmox-acme is used to call the dns-plugins from acme.sh and has the config editing (saving/clearing) turned int no-ops. bash's `return` statement w/o argument returns the value of the last executed command (the one before our no-op method was called) (see `help return` in bash). This leads to unexpected behavior in some plugins, which call one of the methods as last statement join the next step with `&&`. tested bash behavior with: ``` foo() { return; }; if [ -z 'x' ]; then :; else foo ; fi; echo $? ``` reported in our community-forum: https://forum.proxmox.com/threads/pmg-acme-dns-with-cyon-failing-to-issue-certificate.92762 Signed-off-by: Stoiko Ivanov --- src/proxmox-acme | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/proxmox-acme b/src/proxmox-acme index 9c55521..6cc7b5f 100644 --- a/src/proxmox-acme +++ b/src/proxmox-acme @@ -609,7 +609,7 @@ __red() { } _log() { - return + return 0 } _info() { @@ -640,11 +640,11 @@ _readaccountconf_mutable() { # no-ops: _clearaccountconf() { - return + return 0 } _cleardomainconf() { - return + return 0 } _debug() { @@ -676,23 +676,23 @@ _secure_debug3() { } _saveaccountconf() { - return + return 0 } _saveaccountconf_mutable() { - return + return 0 } _save_conf() { - return + return 0 } _savedomainconf() { - return + return 0 } _source_plugin_config() { - return + return 0 } # Proxmox implementation to inject the DNSAPI variables -- 2.39.2