Bug#280814: postinst dies when installing apache2-common with no previous installation
Justification: renders package unusable
If you dont have a previous apache2-common installation, postinst always
dies with a nonzero status, breaking dpkg installation process. This
happens because at line 16 of the postinst script, netstat is called
piping his output to grep to set the NO_AF_INET variable. The problem is
that if grep didnt match any line (the more common case for this), grep
returns a non-zero status. Because the script is running with sh -e
(beggining of the script), sh exists if a child process returns non-zero,
so the script dies when setting NO_AF_INET!!! This dont happen when you
are upgrading from a previous version because /etc/apache2/ports.conf
already exists and the if body isn't executed.
Maybe this problem is also present in other lines of the script, I
didn't a full check.
Note, I think this is also applicable to 2.0.52-3, but no to 2.0.52-1