opendkim - initscript not returning statuscode

Bug #1742422 reported by Hajo Locke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
opendkim (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

problem occurs on Ubuntu Ubuntu 14.04.5 LTS

InitScript /etc/init.d/opendkim is returning statuscode 0 even when opendkim is down. So servicchecker are not able to determine if service is down or not. This bug seems to be fixed in Ubuntu 16.04 initscript.

let me show the U14 problem:

# /etc/init.d/opendkim stop
# /etc/init.d/opendkim status
 * opendkim is notttt running
# echo $?
0

U16 looks like this:

# /etc/init.d/opendkim stop
# /etc/init.d/opendkim status
● opendkim.service - DomainKeys Identified Mail (DKIM) Milter
   Loaded: loaded (/lib/systemd/system/opendkim.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mi 2018-01-10 11:57:21 CET; 3s ago
     Docs: man:opendkim(8)
           man:opendkim.conf(5)
           man:opendkim-genkey(8)
           man:opendkim-genzone(8)
           man:opendkim-testadsp(8)
           man:opendkim-testkey
           http://www.opendkim.org/docs.html
  Process: 19456 ExecStart=/usr/sbin/opendkim -x /etc/opendkim.conf -u opendkim -P /var/run/opendkim/opendkim.pid -p $SOCKET $DAEMON_OPTS (code=exited, status=0/SUCCESS)
  Process: 19452 ExecStartPre=/bin/chown opendkim.opendkim /var/run/opendkim (code=exited, status=0/SUCCESS)
  Process: 19448 ExecStartPre=/bin/mkdir -p /var/run/opendkim (code=exited, status=0/SUCCESS)
 Main PID: 19458 (code=exited, status=0/SUCCESS)

Jan 10 11:28:21 myserver systemd[1]: Starting DomainKeys Identified Mail (DKIM) Milter...
Jan 10 11:28:21 myserver systemd[1]: Started DomainKeys Identified Mail (DKIM) Milter.
Jan 10 11:57:18 myserver systemd[1]: Stopping DomainKeys Identified Mail (DKIM) Milter...
Jan 10 11:57:21 myserver systemd[1]: Stopped DomainKeys Identified Mail (DKIM) Milter.

# echo $?
3

difference is initscript in line 126, the end of the status() function.
retun of statuscode is not cached, so this line should be "exit $status" in place of "return $status"

Revision history for this message
David Bürgin (glts) wrote :

This has been fixed in opendkim version 2.10.1-2 (Ubuntu 16.04).

Changed in opendkim (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.