[Pkg-nagios-devel] Bug#675040: icinga-cgi: postinst fails if /etc/icinga/apache2.conf doesn't exist

Alexander Wirt formorer at debian.org
Fri Jun 1 06:19:04 UTC 2012


tags 675040 unreproducible
thanks

On Tue, 29 May 2012, Christoph Anton Mitterer wrote:

> Package: icinga-cgi
> Version: 1.7.0-1
> Severity: normal
> 
> 
> Hi.
> 
> The postinst of icinga-cgi fails if /etc/icinga/apache2.conf doesn't exist with:
> Setting up icinga-cgi (1.7.0-1) ...
> Not replacing deleted config file /etc/icinga/apache2.conf
> dpkg: error processing icinga-cgi (--configure):
>  subprocess installed post-installation script returned error exit status 1
> 
> touching the file, and the postinst runs ok.
> 
> As noted in some previous ticket, I think that this file should rather go
> to some /u/s/d/icinga-cgi/examples/ directory OR to /etc/apache2/sites-available/
> ... which is why I personally delete it, as it's never used in my systems.
And sites-available is still wrong. Anyhow I am not able to reproduce your
problem:

+ ucf --debconf-ok /usr/share/doc/icinga-cgi/examples/apache2.conf
/etc/icinga/apache2.conf
Not replacing deleted config file /etc/icinga/apache2.conf
+ '[' apache2 ']'
+ wc_httpd_apache_include /etc/icinga/apache2.conf icinga apache2
+ local h incfile httpds confdir
+ '[' '!' /etc/icinga/apache2.conf ']'
+ incfile=/etc/icinga/apache2.conf
+ shift
+ '[' '!' icinga ']'
+ name=icinga
+ shift
+ '[' '!' -e /etc/icinga/apache2.conf ']'
+ echo 'include file /etc/icinga/apache2.conf does not exist!'
include file /etc/icinga/apache2.conf does not exist!
+ return 1
+ '[' '' ']'
+ '[' -n '' ']'
+ db_set icinga/adminpassword ''
+ _db_cmd 'SET icinga/adminpassword' ''
+ _db_internal_IFS='    
'
+ IFS=' '
+ printf '%s\n' 'SET icinga/adminpassword '
+ IFS='     
'
+ IFS='
'
+ read -r _db_internal_line
+ RET='value set'
+ case ${_db_internal_line%%[   ]*} in
+ return 0
+ db_set icinga/adminpassword-repeat ''
+ _db_cmd 'SET icinga/adminpassword-repeat' ''
+ _db_internal_IFS='    
'
+ IFS=' '
+ printf '%s\n' 'SET icinga/adminpassword-repeat '
+ IFS='     
'
+ IFS='
'
+ read -r _db_internal_line
+ RET='value set'
+ case ${_db_internal_line%%[   ]*} in
+ return 0
+ db_stop
+ echo STOP
Setting up icinga-core (1.7.0-2) ...

I removed /etc/apache2/conf.d/icinga.conf and in another run also the file
/etc/icinga.

I just don't see the postinst failing.

Alex
 





More information about the Pkg-nagios-devel mailing list