/etc/init.d/incron status return code incorrect

Bug #1587920 reported by Ken Baker
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
incron (Ubuntu)
New
Undecided
Unassigned

Bug Description

/etc/init.d/incron status does not return a return code indicating the process is not running.

$ /etc/init.d/incron status ; echo $?
 * incron is not running
0

http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html indicates that in this case the status code should be 3.

I believe this section of the init script:
        if ! status_of_proc "$(basename "$INCROND")" "$NAME" ; then
            exit $?
        fi
should instead read:
        status_of_proc "$(basename "$INCROND")" "$NAME" && exit 0 || exit $?

With this change patched into the init script:
$ /tmp/incron status ; echo $?
 * incron is not running
3

Description: Ubuntu 14.04.4 LTS
Release: 14.04

incron:
  Installed: 0.5.10-1ubuntu1
  Candidate: 0.5.10-1ubuntu1
  Version table:
 *** 0.5.10-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

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.