[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#275596: nagios-text removes /etc/nagios on purge



On Sat, 09 Oct 2004, Andrew Pollock wrote:

> On Sat, Oct 09, 2004 at 07:32:19AM +0200, Peter Palfrader wrote:
> > On Sat, 09 Oct 2004, Andrew Pollock wrote:
> > 
> > > On Sat, Oct 09, 2004 at 05:52:39AM +0200, Peter Palfrader wrote:
> > > > Package: nagios-text
> > > > Version: 2:1.2-3.6
> > > > Severity: serious
> > > > 
> > > > nagios-text removes /etc/nagios on purge (postinst).  Other packages,
> > > > like nagios-nrpe-server also have configuration in there, and purging
> > > > nagios-text removed them as well.
> > > 
> > > Surely this is akin to "I purged Apache it it blew away all my logs in
> > > /var/log/apache"?
> > 
> > Surely it isn't.  var/log != /etc
> 
> Apache owns /var/log/apache because it made it, and removes it on a purge.
> nagios owns /etc/nagios, and removes it on a purge. All bets are off if
> another package or non-standard configuration goes putting files in there...

var/log is greatly different from /etc.  I don't assume apache rm -rf's
/etc/apache.

> > > Doesn't nagios-text own /etc/nagios? Surely any other packages that go
> > > shoving stuff in /etc/nagios can expect all bets to be off on a purge,
> > > especially if they don't depend on nagios?
> > 
> > Just remove the files you created there.  The package has no business
> > removing other _configuration_ files from /etc/nagios.
> 
> Well that's going to happen if it removes the directory. If the postrm only
> removes the directory when it's empty, it's going require more smarts in the
> the postrm's of all the packages that are using this directory, otherwise
> it's potentially going to get left lying around after all such packages are
> purged.

just try rmdir, or let dpkg solve it, if you have /etc/nagios in the
package.

-- 
Peter



Reply to: