unable to remove --purge because initscript expect configfile to exist

Bug #401909 reported by himdel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
clamav (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: clamav

Description: Ubuntu 8.04.3 LTS
Release: 8.04

clamav-daemon 0.95.1+dfsg-1ubuntu1.2~hardy1

Did purge in aptitude for all clamav packages.
Expected to uninstall clamav, purging config files.
Got error:

Removing clamav-daemon ...
 * There is no configuration file for Clamav.
 * Please either dpkg-reconfigure ClamAV daemon, or copy the example from
 * /usr/share/doc/clamav-base/examples/ to /etc/clamav/clamd.conf and run
 * '/etc/init.d/clamav-daemon start'
invoke-rc.d: initscript clamav-daemon, action "stop" failed.

Because clamav gets removed before clamav-daemon, so there is no longer any configfile.
/etc/init.d/clamav-daemon should check for the presence of configfile only on start, not on stop.
Or the pre/postrm script should ignore it failing.

Revision history for this message
Imre Gergely (cemc) wrote :

I can reproduce this only by deleting /etc/clamav/clamd.conf manually. This configuration file is not in the clamav package, and removing clamav does not remove it. The file gets created on-the-fly after installing packages.

Are you sure you didn't delete the config file by accident, then tried to uninstall the packages? This way that error message appears indeed. But it gives a solution too. Just copy over the example clamd.conf, and all is well.

Revision history for this message
himdel (himdel) wrote :

Right, sorry, mea culpa. Did a little more digging and found out that on that system, clamd.conf was diverted by another package depending on clamav, so when that package got removed, it removed clamd.conf as well. I didn't think to look at the owner of the file before, sorry.

Still, it'd be nice if the init file could handle it :). But yeah, closing the bug.

Changed in clamav (Ubuntu):
status: New → Invalid
Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 401909] Re: unable to remove --purge because initscript expect configfile to exist

What was the other package?

Revision history for this message
himdel (himdel) wrote :

Nothing from the repository.
(It was our company's custom package that depends on clamav and other packages and provides templates and a web configuration interface.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.