[bug-notifications] [exim 0004988]: missing exim pidfile

Mantis Bug Tracker noreply at opencsw.org
Sun Aug 12 16:11:28 CEST 2012


A NOTE has been added to this issue. 
====================================================================== 
https://www.opencsw.org/mantis/view.php?id=4988 
====================================================================== 
Reported By:                cwood
Assigned To:                bwalton
====================================================================== 
Project:                    exim
Issue ID:                   4988
Category:                   packaging
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             2012-08-02 23:37 CEST
Last Modified:              2012-08-12 16:11 CEST
====================================================================== 
Summary:                    missing exim pidfile
Description: 
This is with:

/var/opt/csw/pkgutil/packages/exim-4.76,REV=2012.05.07-SunOS5.9-i386-CSW.pkg

The start clause in /var/opt/csw/svc/method/svc-cswexim reads (excerpts):


DAEMON=/opt/csw/sbin/exim
PIDFILE=/var/run/exim.pid

test -z "$EXIM_PARAMS" && EXIM_PARAMS="-bd -q30m"

case "$1" in
  start)
    echo "Starting MTA: \c"
    $DAEMON $EXIM_PARAMS
    echo "exim."
    ;;


This borks svcadm for disable and restart, as found in
/var/svc/log/network-cswexim:default.log:

[ Aug  2 17:10:59 Stopping because service disabled. ]
[ Aug  2 17:10:59 Executing stop method
("/var/opt/csw/svc/method/svc-cswexim stop"). ]
Stopping MTA: cat: cannot open /var/run/exim.pid: No such file or
directory
Usage: kill [-l] [-n signum] [-s signame] job ...
   Or: kill [ options ] -l [arg ...]


Because stop etc. need to read the pidfile:

  stop)
    echo "Stopping MTA: \c"
    kill `cat "$PIDFILE"`
    echo "exim."
      ;;


To fix this, please have exim write a pid file.

In /var/opt/csw/svc/method/svc-cswexim:

test -z "$EXIM_PARAMS" && EXIM_PARAMS="-bd -oP ${PIDFILE} -q30m"

In /etc/opt/csw/exim/exim-env.sh:

EXIM_PARAMS="-bd -oP /var/run/exim.pid -q30m"
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0004952 svc refresh bug
====================================================================== 

---------------------------------------------------------------------- 
 (0010086) cwood (reporter) - 2012-08-12 16:11
 https://www.opencsw.org/mantis/view.php?id=4988#c10086 
---------------------------------------------------------------------- 
My apologies for the delay.

I installed this:

http://buildfarm.opencsw.org/experimental/exim/exim-4.80,REV=2012.08.04-SunOS5.10-i386-CSW.pkg.gz

I found that it correctly creates a pid file on exim installation and
"svcadm enable network/cswexim".

One caveat is that the experimental package doesn't remove
/var/run/exim.pid when I run "svcadm disable network/cswexim". This can be
a problem with software like monit, where it may check for a running
process using the pid from the pidfile, and run the start script if the
process doesn't exist.

(Obviously Solaris has SMF, but you never know what people may decide to
install.)



More information about the bug-notifications mailing list