[Pkg-pdns-maintainers] Bug#798773: postinst script handles comments in config file incorrectly
Leon Weber
leon at leonweber.de
Sat Sep 12 13:27:57 UTC 2015
Package: pdns-server
Version: 3.4.1-4+deb8u3
Hi,
The postinst script tries to find any “include=…” lines in pdns.conf in
order to find the pdns config directory. However, the script fails to
ignore comments in the configuration file, so “#include=…” lines (or
basically any lines containing “include”) will match as well. This can
cause error messages from ucfr such as
Setting up pdns-server (3.4.1-4+deb8u3) ...
ucfr: *** ERROR: Need exactly two arguments, got 3
[ … ucfr usage output follows … ]
dpkg: error processing package pdns-server (--configure):
subprocess installed post-installation script returned error exit
status 3
Errors were encountered while processing:
pdns-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
The culprit lies in pdns-server.postinst line 20:
PDNSDIR=`cat $PDNSCONF | grep include | awk -F '=' '{print $2}'`
I think an easy, but effective fix could be as simple as:
PDNSDIR=`cat $PDNSCONF | grep '^include' | awk -F '=' '{print $2}'`
Regards,
-- Leon.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-pdns-maintainers/attachments/20150912/071b2864/attachment.sig>
More information about the Pkg-pdns-maintainers
mailing list