Freddie Cash wrote:
> On Thu, May 14, 2009 at 4:03 PM, Bill Landry <[email protected]> wrote:
>>> In the actual script itself, it all references
>>> /etc/clamav-unofficial-sigs.conf, which is different from the *.cron
>>> file, where everything references
>>> /usr/local/etc/clamav-unofficial-sigs.conf.
>> Yes, because /etc is the default location for the config file.  If you use
>> the '-c' flag, you can use any config file located wherever you want.
>>
>>> And the INSTALL file references both locations.
>> Yes, again because you can run the script with multiple different config
>> files, and with each one setup differently, if you want.
> 
> Well, the release notes say one thing, the install file says another,
> and the script says different, which is why I made the comment.
> 
>>> Perhaps it's time to cook up a Makefile or an install script that uses
>>> sed to alter the paths in the cron/man/script and then copies the
>>> files into the correct locations.  :)
>> Why, the script was intentionally setup this way?  You can decide to use
>> the default config file location, an alternative location, or both - it's
>> up to you.  And this will not change.
> 
> Which is fine.  But the docs don't match the script.  The only reason
> I brought it up was that it was mentioned in the release notes.

Alright, let's go through this.

The INSTALL says:

cp clamav-unofficial-sigs.sh /path/to/script_dir  (usually something
like /usr/bin)

I'll change this to "(usually something like /usr/local/bin)"

The CHANGELOG says:

... Also updated the cron file to point the script location to
/usr/local/bin/ instead of /usr/bin/.  This also matches the base path
to the config file (/usr/local/).

The script itself points to the default config file location:

default_config="/etc/clamav-unofficial-sigs.conf"

However, this can be overridden by the script's '-c' flag.  The reason
for this is that most of the script flags do not point to a config file
location, so the script must find the config file in the default
location in order to support its variables expansion.

For cron runs of the script, the user can point to a specific config
file with specific settings to be used when run via cron.  For example,
I may want cron runs of the script to enable logging, disable clamd
status checks, silence output except error conditions, enable time
randomization, etc.

But when I run the script manually, I may want to disable logging,
enable clamd status checks, enable all script information output,
disable database reloads, etc.

Being able to point cron to a different config file than the default
location give the user additional flexibility to decide how they want
the script to run when run via cron versus when executed manually.

Hope this helps to clarify...

Bill


_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to