[Pkg-clamav-devel] Bug#600908: Improvement to clamav-milter init script

Chris Moules christopher at gms.lu
Thu Oct 21 08:47:06 UTC 2010


Package: clamav-milter
Version: 0.96.3+dfsg-2~volatile1

We have recently experienced the case that clamav-milter was 'running' but the socket file was missing. This caused our mail
system (postfix) to reject mail with a temporary error.

Monitoring the service by checking the return code from '/etc/init.d/clamav-milter status' did not catch this situation.

I have updated the 'status' check to include a check for the sockets existence and an alternate error code (LSB correct, I
believe). See attached patch.

The patch also fixes the call to 'status_of_proc' with the variable $BASENAME in place of $NAME (which does not exist).
It also moves the 'local' copy of the function 'status_of_proc' below the sourcing of '/lib/lsb/init-functions' so that this
version of the function gets called. Before, this local copy of the function was just unused code in the init script. This local
copy of the LSB function now checks the existence of the clamav-milter socket as defined in '$SOCKET_PATH'.

Regards

Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clamav-milter_init.patch
Type: text/x-patch
Size: 1818 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-clamav-devel/attachments/20101021/c1041be7/attachment.bin>


More information about the Pkg-clamav-devel mailing list