I was not attentive.
After 'fresh install' dpkg-reconfigure clamav-freshclam'ing
The file is:
$ cat /etc/clamav/freshclam.conf
# Automatically created by the clamav-freshclam postinst
# Comments will get lost when you reconfigure the clamav-freshclam package
DatabaseOwner clamav
UpdateLogFile /var/log/clamav/freshclam.log
LogVerbose false
LogSyslog false
LogFacility LOG_LOCAL6
LogFileMaxSize 0
Foreground false
Debug false
MaxAttempts 5
DatabaseDirectory /var/lib/clamav/
DNSDatabaseInfo current.cvd.clamav.net
AllowSupplementaryGroups false
PidFile /var/run/clamav/freshclam.pid
ConnectTimeout 30
ReceiveTimeout 30
NotifyClamd
DatabaseMirror db.local.clamav.net
DatabaseMirror database.clamav.net
If I execute dpkg-reconfigure clamav-freshclam have the file with empty
NotifyClamd it gives:
$ sudo dpkg-reconfigure clamav-freshclam
Password:
+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z '' ']'
++ exec
++ '[' '' ']'
++ exec
++ DEBCONF_REDIR=1
++ export DEBCONF_REDIR
+ FRESHCLAMCONFFILE=/etc/clamav/freshclam.conf
+ FRESHCLAMLOGFILE=/var/log/clamav/freshclam.log
+ DEBCONFILE=/var/lib/clamav/freshclam.conf
+ LOGROTFILE=/etc/logrotate.d/clamav-freshclam
+ DEBROTFILE=/var/lib/clamav/clamav-freshclam
<SKIP>
+ read -r _db_internal_line
+ RET=true
+ case ${_db_internal_line%%[ ]*} in
+ return 0
+ '[' true = true ']'
+ notify=/etc/clamav/clamd.conf
+ slurp_config /etc/clamav/freshclam.conf
<SKIP>
+ unset value
+ for variable in '`egrep -v '\''^[[:space:]]*(#|$)'\'' "$CLAMAVCONF" |
awk '\''{print $1}'\''`'
+ '[' NotifyClamd = DatabaseMirror ']'
+ '[' NotifyClamd = VirusEvent ']'
+ '[' NotifyClamd = OnUpdateExecute ']'
+ '[' NotifyClamd = OnErrorExecute ']'
++ grep '^NotifyClamd' /etc/clamav/freshclam.conf
++ head -n1
++ awk '{print $2}'
+ value=
+ '[' -z '' ']'
+ export NotifyClamd=true
+ NotifyClamd=true
+ unset value
<SKIP>
+ cat
+ '[' -n /etc/clamav/clamd.conf ']'
+ '[' -n true ']'
+ echo 'NotifyClamd true'
<SKIP>
+ update-rc.d -f clamav-freshclam remove
+ exit 0
And as the result
$ grep NotifyClamd /etc/clamav/freshclam.conf
NotifyClamd true
It seems that incorrect code is (starting from line 252)
if [ -n "$notify" ];then
if [ -n "$NotifyClamd" ] ; then
echo "NotifyClamd $NotifyClamd" >> $DEBCONFILE
else
echo "NotifyClamd" >> $DEBCONFILE
fi
fi
Correct should be
if [ -n "$notify" ];then
if [ -n "$NotifyClamd" = "true" ] ; then
echo "NotifyClamd $notify" >> $DEBCONFILE
else
echo "NotifyClamd" >> $DEBCONFILE # not sure if this string should be
fi
fi
--
Sincerely yours/С уважением,
Damir Islamov/Дамир Исламов
email: [EMAIL PROTECTED]