When doing "/etc/init.d/pmacctd status" the status will be reported as crashed although the processes for for pmacctd are running and working. The problem is a typo in the init script : start() { checkconfig || return 1 ebegin "Starting ${SVCNAME}" start-stop-daemon --start \ --pidfile "${PMACCTDPID}" \ --exec /usr/sbin/"${SVCNAME}" \ -- -D -f "${PMACCTDCONF}" \ -F "${PMACCTDPID}" ${OPTS} eend $? } produces the wrong status "crashed", because the pid would not be written to ${PMACCTDPID}. Changing the above to start() { checkconfig || return 1 ebegin "Starting ${SVCNAME}" start-stop-daemon --start \ --pidfile "${PMACCTDPID}" \ --exec /usr/sbin/"${SVCNAME}" \ -- -D -f "${PMACCTDCONF}" -F "${PMACCTDPID}" ${OPTS} eend $? } ommiting the "\" before -F "${PMACCTDPID}" will produce correct status output and the pid is written.... Reproducible: Always Steps to Reproduce: 1. emerge pmacctd 2. configure 3. runt /etc/init.d/pmacctd start Actual Results: * status: crashed Expected Results: * status: started
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e7a4cf914eb4cf0be07c35a0b6028c6929e9e14 commit 8e7a4cf914eb4cf0be07c35a0b6028c6929e9e14 Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2020-06-17 04:26:47 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2020-06-17 04:42:01 +0000 net-analyzer/pmacct: Version 1.7.4_p1 Package-Manager: Portage-2.3.101, Repoman-2.3.22 Closes: https://bugs.gentoo.org/show_bug.cgi?id=719112 Closes: https://bugs.gentoo.org/show_bug.cgi?id=723226 Signed-off-by: Jeroen Roovers <jer@gentoo.org> net-analyzer/pmacct/Manifest | 1 + .../pmacct/files/pmacct-1.7.4-nDPI-3.2.patch | 47 ++++++++++ net-analyzer/pmacct/files/pmacctd-init.d | 2 +- net-analyzer/pmacct/pmacct-1.7.4_p1.ebuild | 103 +++++++++++++++++++++ 4 files changed, 152 insertions(+), 1 deletion(-)
commit d42daffe5676ab927e72a49bbe950ce511f711ef Author: Jeroen Roovers <jer@gentoo.org> Date: Fri Sep 11 06:59:07 2015 +0200 net-analyzer/pmacct: Version bump. Package-Manager: portage-2.2.20.1 [...] diff --git a/net-analyzer/pmacct/files/pmacctd-init.d b/net-analyzer/pmacct/files/pmacctd-init.d index 3a0cc734991..0c3fb905bd9 100644 --- a/net-analyzer/pmacct/files/pmacctd-init.d +++ b/net-analyzer/pmacct/files/pmacctd-init.d @@ -25,13 +25,17 @@ checkconfig() { start() { checkconfig || return 1 ebegin "Starting ${SVCNAME}" - start-stop-daemon --start --pidfile "${PMACCTDPID}" --exec /usr/sbin/"${SVCNAME}" \ - -- -D -f "${PMACCTDCONF}" -F "${PMACCTDPID}" ${OPTS} + start-stop-daemon --start \ + --pidfile "${PMACCTDPID}" \ + --exec /usr/sbin/"${SVCNAME}" \ + -- -D -f "${PMACCTDCONF}" \ -F "${PMACCTDPID}" ${OPTS} eend $? } stop() { ebegin "Stopping ${SVCNAME}" - start-stop-daemon --stop --pidfile "${PMACCTDPID}" --exec /usr/sbin/"${SVCNAME}" + start-stop-daemon --stop \ + --pidfile "${PMACCTDPID}" \ + --exec /usr/sbin/"${SVCNAME}" eend $? } Oops, that's been with us for a long time. Thanks for the patch!