[debhelper-devel] Bug#711755: don't attempt to reload apache2 if it wasn't running before we started the upgrade

Arno Töll arno at debian.org
Sun Jul 13 13:04:21 UTC 2014


reassign 711755 debhelper
affects 711755 src:apache2
thanks

Hi,

On 09.06.2013 14:33, jidanni at jidanni.org wrote:
> I'm telling you guys, not everybody runs apache2 24/7/365 days a year,
> so please double check if it was running first (before the upgrade
> started) before causing these error messages during upgrades!

technically, we do not but debhelper does.

We call dh_installinit as:

override_dh_installinit:
        dh_installinit --restart-after-upgrade --error-handler=true --
defaults 91 09


which is expanded to:


# Automatically added by dh_installinit
if [ -x "/etc/init.d/apache2" ]; then
    update-rc.d apache2 defaults 91 09 >/dev/null
    if [ -n "$2" ]; then
        _dh_action=restart
    else
        _dh_action=start
    fi
    invoke-rc.d apache2 $_dh_action || true
fi
# End automatically added section


in postinst.

I think, debhelper should check through invoke-rc.d status - when
available - before (re-)starting a daemon unconditionally.

This is arguably a behavior which should be addressed on a higher level
for all packages that handle init scripts through dh_installinit. If
debhelper maintainers disagree, please assign back and we may workaround
that particular behavior for our package only, even though that sounds
wrong to me.



-- 
with kind regards,
Arno Töll
IRC: daemonkeeper on Freenode/OFTC
GnuPG Key-ID: 0x9D80F36D

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 880 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20140713/9573c7cc/attachment.sig>


More information about the debhelper-devel mailing list