]> git.proxmox.com Git - proxmox-acme.git/commit
plugin-caller: make no-ops always successful
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 16 Jul 2021 13:43:05 +0000 (15:43 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 16 Jul 2021 15:58:48 +0000 (17:58 +0200)
commitb0d717c72fffda0f83a2273153dd10462965f16a
treece15a79472e40c00439a8438054aeba306ee2408
parent79364a8c544800652af04ba0acd53f3d4951dc5d
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 <s.ivanov@proxmox.com>
src/proxmox-acme