[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6198-g6203023
Michael Tautschnig
mt at debian.org
Mon Apr 19 11:56:16 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 6203023e77e4ae72011edd2ccb9e1a4de69c2416
Author: Michael Tautschnig <mt at debian.org>
Date: Mon Apr 19 13:55:31 2010 +0200
freshclam logrotation once again
- Upon fresh installs, UpdateLogFile would still be empty
Signed-off-by: Michael Tautschnig <mt at debian.org>
diff --git a/debian/clamav-freshclam.postinst.in b/debian/clamav-freshclam.postinst.in
index d696c36..369d42d 100644
--- a/debian/clamav-freshclam.postinst.in
+++ b/debian/clamav-freshclam.postinst.in
@@ -96,15 +96,21 @@ case "$1" in
slurp_config "$FRESHCLAMCONFFILE"
- if [ -n "$UpdateLogFile" ]; then
- if echo "$UpdateLogFile" | grep -q '^/dev/'; then
+ # Make sure user changes to unasked questions remain intact
+ [ -n "$DatabaseOwner" ] && [ "$DatabaseOwner" != "$dbowner" ] && dbowner="$DatabaseOwner"
+ [ -n "$UpdateLogFile" ] && [ "$UpdateLogFile" != "$udlogfile" ] && udlogfile="$UpdateLogFile"
+ [ -n "$MaxAttempts" ] && [ "$MaxAttempts" != "$maxatt" ] && maxatt="$MaxAttempts"
+ [ -n "$Bytecode" ] && [ "$Bytecode" != "$bytecode" ] && bytecode="$ByteCode"
+
+ if [ -n "$udlogfile" ]; then
+ if echo "$udlogfile" | grep -q '^/dev/'; then
make_logrotate=false
else
make_logrotate=true
fi
[ -n "$User" ] || User=clamav
if [ "$make_logrotate" = 'true' ]; then
- echo "$UpdateLogFile {" > $DEBROTFILE
+ echo "$udlogfile {" > $DEBROTFILE
echo " rotate 12" >> $DEBROTFILE
echo " weekly" >> $DEBROTFILE
echo " compress" >> $DEBROTFILE
@@ -115,9 +121,9 @@ case "$1" in
echo " /etc/init.d/clamav-freshclam reload-log > /dev/null" >> $DEBROTFILE
echo " endscript" >> $DEBROTFILE
echo " }" >> $DEBROTFILE
- touch "$UpdateLogFile"
- chown "$User":adm "$UpdateLogFile"
- chmod 0640 "$UpdateLogFile"
+ touch "$udlogfile"
+ chown "$User":adm "$udlogfile"
+ chmod 0640 "$udlogfile"
ucf_cleanup "$LOGROTFILE"
ucf_upgrade_check "$LOGROTFILE" "$DEBROTFILE" /var/lib/ucf/cache/:etc:logrotate.d:clamav-freshclam
rm -f $DEBROTFILE
@@ -136,12 +142,6 @@ case "$1" in
fi
fi
- # Make sure user changes to unasked questions remain intact
- [ -n "$DatabaseOwner" ] && [ "$DatabaseOwner" != "$dbowner" ] && dbowner="$DatabaseOwner"
- [ -n "$UpdateLogFile" ] && [ "$UpdateLogFile" != "$udlogfile" ] && udlogfile="$UpdateLogFile"
- [ -n "$MaxAttempts" ] && [ "$MaxAttempts" != "$maxatt" ] && maxatt="$MaxAttempts"
- [ -n "$Bytecode" ] && [ "$Bytecode" != "$bytecode" ] && bytecode="$ByteCode"
-
# Set up cron method
if [ "$runas" = cron ]; then
min=$(( `od -A n -N 2 -l < /dev/urandom` % 3600 / 60 ))
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list