exim4 init script fails to create pid file

Bug #48045 reported by Christian Rueb
32
Affects Status Importance Assigned to Milestone
exim4 (Debian)
Fix Released
Unknown
exim4 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: exim4-base

Version of exim4-base: 4.60-3ubuntu3

As /var/run is not a persistend directory the subdirectory /var/run/exim4 is missing after the first reboot. When the /etc/init.d/exim4 startup script tries to create the necessary pid files this fails. If you want to stop or restart exim this fails quietly:
-old pidfile is not found
-exim will not be stopped
-new exim starts (and fails to grab the SMTP port) and gives up after a certain time
-old exim keeps on running

Possible Solution:

Add the folling in the runlevel script:
test -d /var/run/exim4 || mkdir -p /var/run/exim4

Cheers,
  Christian

Revision history for this message
Martin Emrich (emme) wrote :

Same here, after adding the mkdir line, it works.

Regards,

Martin

Revision history for this message
Chris (chfritsch-gmx) wrote :

Same here

probably better solution(?):

# make sure that the pidfile directory exists
PIDDIR=${PIDFILE%/*}
if [ ! -d "$PIDDIR" ]; then
    mkdir "$PIDDIR"
    chmod 0755 "$PIDDIR"
    chown Debian-exim "$PIDDIR"

now the user Debian-exim is the owner of /var/run/exim4. (taken from /etc/init.d/munin)

Cheers,
Chris

Revision history for this message
Sam Bashton (sam-bashton) wrote :

Any chance of getting this one fixed?

It's not exactly a complex change to consider - the problem and solution are both extremely obvious.

Revision history for this message
Adam Wendt (adam-ipwebdev) wrote :

Confirmed and possible fixes in previous comments.

Changed in exim4:
status: Unconfirmed → Confirmed
Revision history for this message
Reinhard Tartler (siretart) wrote :

fixed in debian, synced in ubuntu a long time ago...

Changed in exim4:
status: Confirmed → Fix Released
Changed in exim4:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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