[Pkg-nagios-devel] Bug#410313: nagios-mysql: Postrm script issue: config file should be remove with ucf too

Frédéric Brin frederic.brin at assonetworx.com
Fri Feb 9 17:07:06 CET 2007

Package: nagios-mysql
Version: 1.4-3
Severity: normal
Tags: patch


Takink inspiration for the nagios-mysql package, I founded an issue in
the postrm script. 

1- When you purge the package you should run ucf too to get ride of the
debian db-config file

for more info about the subject.

2- cgi.cfg is also produced with ucf so you also need to remove it

Patch included corrects this two errors. It should also be applied on

Best regards,

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
-------------- next part --------------
--- nagios-mysql.postrm.orig	2007-02-09 14:49:10.589144939 +0100
+++ nagios-mysql.postrm	2007-02-09 14:53:54.603429230 +0100
@@ -16,6 +16,11 @@
 if [ "$1" = "purge" ]; then
 	rm -f /etc/nagios/database.cfg
+	rm -f /etc/nagios/cgi.cfg
+	if which ucf >/dev/null 2>&1; then
+     		ucf --purge /etc/nagios/database.cfg
+     		ucf --purge /etc/nagios/cgi.cfg
+     	fi

More information about the Pkg-nagios-devel mailing list