clamav: fix database present check

Message ID 20200430105041.9818-1-arne_f@ipfire.org
State Accepted
Commit 63decf77c79495b2854c69778918b79c26823815
Headers
Series clamav: fix database present check |

Commit Message

Arne Fitzenreiter April 30, 2020, 10:50 a.m. UTC
  the mame of main.cvd has changed to main.cld on my system.
Add both types and also ad bytecode.c?d

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
---
 lfs/clamav                      | 4 ++--
 src/initscripts/packages/clamav | 7 +++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
  

Patch

diff --git a/lfs/clamav b/lfs/clamav
index be6f5155d..4688f0fb8 100644
--- a/lfs/clamav
+++ b/lfs/clamav
@@ -1,7 +1,7 @@ 
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2019  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2020  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -32,7 +32,7 @@  DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = clamav
-PAK_VER    = 49
+PAK_VER    = 50
 
 DEPS       =
 
diff --git a/src/initscripts/packages/clamav b/src/initscripts/packages/clamav
index d2f63a910..439c20579 100644
--- a/src/initscripts/packages/clamav
+++ b/src/initscripts/packages/clamav
@@ -12,9 +12,12 @@  case "$1" in
 
 			COUNTER=0
 			while [ "$COUNTER" -lt "61" ]; do
+				[ -e "/var/lib/clamav/main.cld" ] || \
 				[ -e "/var/lib/clamav/main.cvd" ] && \
-					[ -e "/var/lib/clamav/daily.cvd" ] || \
-					[ -e "/var/lib/clamav/daily.cld" ] && \
+				[ -e "/var/lib/clamav/bytecode.cld" ] || \
+				[ -e "/var/lib/clamav/bytecode.cvd" ] && \
+				[ -e "/var/lib/clamav/daily.cld" ] || \
+				[ -e "/var/lib/clamav/daily.cvd" ] && \
 				break
 				if [ "$COUNTER" -lt "1" ]; then
 					boot_mesg -n "Downloading database"