The amavisd-snmp init script uses double-bracket "[[ ... ]]" tests, which crash OpenRC when /bin/sh is not bash: $ sudo /etc/init.d/amavisd-snmp start * Caching service dependencies ... /lib64/rc/sh/gendepends.sh: 12: /lib64/rc/sh/gendepends.sh: [[: not found /lib64/rc/sh/gendepends.sh: 14: /lib64/rc/sh/gendepends.sh: [[: not found /lib64/rc/sh/gendepends.sh: 23: /lib64/rc/sh/gendepends.sh: [[: not found
Created attachment 523382 [details] amavisd-snmp.initd.patch Fixed. Please apply this patch.
Created attachment 523384 [details, diff] amavisd-snmp.initd.patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8635dce998732f7f82cc6c51bd0a7014c5e6ae6a commit 8635dce998732f7f82cc6c51bd0a7014c5e6ae6a Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2018-11-22 03:10:18 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2018-11-26 00:17:56 +0000 mail-filter/amavisd-new: new revision to clean up auxiliary init scripts. * Two new service scripts for amavisd-snmp-agent{,-zmq}. Prior, both of these programs were installed, but had only a single service script which tried to figure out what to do at runtime. The new way is cleaner, doesn't rely on bashisms (bug 630896), and fixes a security issue (bug 630898). * A new OpenRC service script for amavis-mc. This fixes an unreported (to Gentoo, anyway) security issue. This program can create its PID file only after dropping privileges, which makes it unsafe for OpenRC to later "kill" it. The new script runs the program in the foreground and lets OpenRC (safely) handle the bookkeeping. Closes: https://bugs.gentoo.org/630896 Bug: https://bugs.gentoo.org/630898 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 .../amavisd-new/amavisd-new-2.11.1-r2.ebuild | 198 +++++++++++++++++++++ mail-filter/amavisd-new/files/amavis-mc.initd-r1 | 18 ++ .../files/amavisd-snmp-subagent-zmq.initd | 26 +++ .../amavisd-new/files/amavisd-snmp-subagent.initd | 25 +++ 4 files changed, 267 insertions(+)