Bug 224728 - security/clamav: Fails to start when /var/run is on volatile TEMPFS
Summary: security/clamav: Fails to start when /var/run is on volatile TEMPFS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Larry Rosenman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-30 13:31 UTC by O. Hartmann
Modified: 2017-12-30 22:26 UTC (History)
1 user (show)

See Also:
ohartmann: maintainer-feedback+


Attachments
Makefile and rc-script patches (2.50 KB, patch)
2017-12-30 13:31 UTC, O. Hartmann
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2017-12-30 13:31:58 UTC
Created attachment 189219 [details]
Makefile and rc-script patches

security/clamav doesn not restart after the initial installation, once the system has been repbooted and the /var/run folder resides on tempfs or memory filesystem. The reason seems to be the loss of the /var/run/clamav folder, which is initially installed when the package/port gets the first time installed, but the appropriate rc script doesn't check for the existence of /var/run/clamav.

The result is shown bewlow.

Attached I'll offer some ideas for a patch of the port framework to aim for the problem, see attachment.

[...]
 service clamav-clamd restart
clamav_clamd not running?
Starting clamav_clamd.
ERROR: LOCAL: Socket file /var/run/clamav/clamd.sock could not be bound: No such file or directory
Closing the main socket.
ERROR: Can't unlink the socket file /var/run/clamav/clamd.sock
/usr/local/etc/rc.d/clamav-clamd: WARNING: failed to start clamav_clamd


Kind regards,

O. Hartmann
Comment 1 Larry Rosenman freebsd_committer freebsd_triage 2017-12-30 22:25:51 UTC
Committed, thanks.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-12-30 22:26:16 UTC
A commit references this bug:

Author: ler
Date: Sat Dec 30 22:25:18 UTC 2017
New revision: 457649
URL: https://svnweb.freebsd.org/changeset/ports/457649

Log:
  security/clamav: handle memfs/tmpfs /var/run.

  PR:		224728
  Submitted by:	O. Harmann <ohartmann@walstatt.org>

Changes:
  head/security/clamav/Makefile
  head/security/clamav/files/clamav-clamd.in
  head/security/clamav/files/clamav-freshclam.in