Clamd fails on reboot

Arthur Dent misc.lists at blueyonder.co.uk
Wed Jul 20 15:11:03 UTC 2011


      * On Wed, 2011-07-20 at 08:56 -0400, Genes MailLists wrote:
> On 07/20/2011 07:59 AM, Arthur Dent wrote:
> 
> 
> 
> ...
> 
> > 
> > Should I put a "touch $PIDFILE" in there? Or would I also need a mkdir
> > command?
> > 
> > This is a Fedora yum package. Shouldn't this just work?
> 
> 
>   1) I think clamd should be doing the mkdir .. not the start script ..
> but ..
> 
>   2) For now I'd put (you sure about the dir having .{${CLAMD_SERVICE}
> } on the end?
> 
>      piddir =  /var/run/clamd.${CLAMD_SERVICE} ## fix if needed
> 
>      if [ !-d $piddir ] ; then
>          mkdir piddir}
> 
>      fi
> 
>    in the file ...
> 
>   3) i'd file a bug report against clamav on this - needing to be
> updated for /var/run being tmpfs.
> 
> gene/

Thanks Gene.

https://bugzilla.redhat.com/show_bug.cgi?id=723544

Also, I found that in order for your suggested modification to work I
needed to put a space between the ! and the -d and also I needed to
chown the new directory.

For the benefit of the archives this is what now works for me:

#============8<===================================================
# In the definitions section:
CLAMD_PIDDIR=/var/run/clamd.${CLAMD_SERVICE}

# and in the "start" stanza:

 if [ ! -d $CLAMD_PIDDIR ] ; then
         mkdir $CLAMD_PIDDIR && chown clamd:clamd $CLAMD_PIDDIR
      fi
#============8<===================================================

Thanks again for your help Gene. Much appreciated.

Mark


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20110720/a10d2892/attachment.bin 


More information about the users mailing list