Package: postfix
Version: 2.8.7-1
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu precise ubuntu-patch

Hi LaMont,

I've just pushed a patch to postfix in Ubuntu for
<https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/927803>: if
resolvconf is installed (which it now always is), the resolvconf job tries
to run immediately after /run becomes available, and if postfix is
installed, the postfix hook will always fail *unless* /usr is on a separate
partition, because / is not yet mounted rw.

I think it's best to make the hook into a no-op if postfix isn't currently
running.

Changelog entry for this upload was:

  * debian/update-libc.d: before we try to copy the resolv.conf over, just
    check if the service is running by calling /etc/init.d/postfix status.
    If it's not running, there's never a need to copy, and if it's running
    we know the package is installed - making other checks superfluous and
    ensuring our hook doesn't exit non-zero if called before /var is mounted
    read-write.  LP: #927803.

Thanks for considering the patch.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
=== modified file 'debian/update-libc.d'
--- debian/update-libc.d	2011-10-05 14:11:54 +0000
+++ debian/update-libc.d	2012-02-17 01:48:37 +0000
@@ -1,8 +1,8 @@
 #!/bin/sh -e
 
-# make sure we're still here...
-[ -x /usr/sbin/postconf ] || exit 0
-[ -r /etc/postfix/main.cf ] || exit 0
+# we only need to copy this in if the service is already running.
+# if it's not running, it'll get picked up by the init script on start.
+/etc/init.d/postfix status >/dev/null 2>&1 || exit 0
 
 cp /etc/resolv.conf $(/usr/sbin/postconf -h queue_directory)/etc/resolv.conf
 /etc/init.d/postfix reload >/dev/null 2>&1 || exit 0

Reply via email to