[Pkg-nagios-devel] Bug#867256: monitoring-plugins-basic: fails to install: Error: The new file apt.cfg does not exist!

Andreas Beckmann anbe at debian.org
Mon Jul 10 18:52:16 UTC 2017


Control: tag -1 sid buster - moreinfo unreproducible

On 2017-07-10 15:39, Jan Wagner wrote:
> I did run a "apt install monitoring-plugins-basic" on a fresh stretch
> container.

Looking at my logs, the problem was only reproducible in sid at the time
I filed the bug, but now it also happens in buster.

OK, let me debug a bit more after the failure occurred

# sed -i '2iset -x' /var/lib/dpkg/info/monitoring-plugins-basic.postinst
# dpkg --configure --pending
Setting up monitoring-plugins-basic (2.2-3) ...
+ set -e
+ templdir=/usr/share/monitoring-plugins/templates-basic
+ . /usr/share/monitoring-plugins/dpkg/functions
+ npconfdir=/etc/nagios-plugins/config
+ plugindir=/usr/lib/nagios/plugins/
+ [ configure = configure ]
+ register_cfgs
+ cd /usr/share/monitoring-plugins/templates-basic
+ dest=/etc/nagios-plugins/config/apt.cfg
+ ucf apt.cfg /etc/nagios-plugins/config/apt.cfg
Error: The new file apt.cfg does not exist!
dpkg: error processing package monitoring-plugins-basic (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 monitoring-plugins-basic

extending the error message in ucf to also print $(pwd), reveals that
the current directory of the process is /, which leads us to


debconf (1.5.62) unstable; urgency=medium
...
  * Change directory to / before executing maintainer scripts (closes:
    #608648).
...


So address your configuration files with absolute paths.



Andreas



More information about the Pkg-nagios-devel mailing list