Subject: rc.subr apparently doesn't like hyphenated daemons
To: None <current-users@netbsd.org>
From: John F. Woods <jfw@jfwhome.funhouse.com>
List: current-users
Date: 03/13/2005 15:29:21
I just discovered that ClamAV has stopped working on my system.  Although I
had several things wrong in my configuration, the final problem was that
the clamav-milter daemon wasn't being started.  After some poking around,
it appears that rc.subr gets confused if the daemon name contains a hyphen
(as in clamav-milter).  For example, it was attempting to check whether
the chroot directory '-milter-chroot/usr/sbin/pkg/clamav' exists, and
(when I tried to shut down the daemon) tried to do so as the user "-milter_user"
(note the hyphen) which caused su to interpret the user name as a bunch of
bogus flags.  I renamed the daemon to clamav_milter, changed the rc.d script
accordingly, and it started working.

Unfortunately, I didn't take detailed notes, so I don't have a clear
documentation of the problems, but it this hasn't been fixed already (and
if no one else is seeing it) I can probably reproduce it easily.  I think
this is a result of a change between 1.6 and 2.0, since the last time I
knew that clamav was working was just before I upgraded.