Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#8728 - clamav: startup script should clean up .sock file that could remaining from a previous clamd crash

Attached to Project: Arch Linux
Opened by Arnaud MAZIN (arnaudmz) - Wednesday, 21 November 2007, 15:52 GMT
Last edited by Roman Kyrylych (Romashka) - Saturday, 24 November 2007, 10:33 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Dale Blount (dale)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: when clamd has crashed or has been stopped not gently, rc script won't remove /var/lib/clamav/clamd.sock resulting in clamd refusing to start anymore, until .sock file has been manualy removed.


Additional info:
* clamav 0.91.2-1

Steps to reproduce:
* killall -9 clamd
* /etc/rc.d/clamd start

=> log file (/var/log/clamav/clamd.log) shows that clamd refuses to start:
Wed Nov 21 11:08:32 2007 -> ERROR: Socket file /var/lib/clamav/clamd.sock exists. Either remove it, or configure a different one

Suggested modification:
in /etc/rc.d/clamd: replace
==================
[ -z "$PID_CD" ] && /usr/sbin/clamd
==================
by
==================
[ -z "$PID_CD" ] && rm -f /var/lib/clamav/clamd.sock
[ -z "$PID_CD" ] && /usr/sbin/clamd
==================
This task depends upon

Closed by  Roman Kyrylych (Romashka)
Saturday, 24 November 2007, 10:33 GMT
Reason for closing:  Won't implement
Comment by Hussam Al-Tayeb (hussam) - Saturday, 24 November 2007, 02:35 GMT
This isn't a bug. Also, I don't think your approach is good.
clamav can already handle your problem.

The best fix for your problem is to set:

# Remove stale socket after unclean shutdown.
FixStaleSocket yes

in /etc/clamav/clamd.conf


Comment by Arnaud MAZIN (arnaudmz) - Saturday, 24 November 2007, 07:18 GMT
My fault, sorry

Loading...