mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
clamav: Move database directory to /var partition
The clamav database is quite large and occupies valuable space on the root partition that on older systems is only 2GB large. This change moves the virus definition database to the /var partition which is larger and supposed to hold data like this anyway. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -27,7 +27,6 @@ usr/lib/libclamunrar_iface.so.7.1.1
|
||||
#usr/lib/pkgconfig/libclamav.pc
|
||||
#usr/lib/pkgconfig/libclammspack.pc
|
||||
usr/sbin/clamd
|
||||
usr/share/clamav
|
||||
#usr/share/man/man1/clambc.1
|
||||
#usr/share/man/man1/clamconf.1
|
||||
#usr/share/man/man1/clamdscan.1
|
||||
@@ -45,5 +44,6 @@ var/ipfire/clamav/clamd.conf
|
||||
var/ipfire/clamav/clamd.conf.sample
|
||||
var/ipfire/clamav/freshclam.conf
|
||||
var/ipfire/clamav/freshclam.conf.sample
|
||||
var/lib/clamav
|
||||
etc/rc.d/init.d/clamav
|
||||
usr/local/bin/clamavctrl
|
||||
|
||||
11
lfs/clamav
11
lfs/clamav
@@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
PROG = clamav
|
||||
PAK_VER = 40
|
||||
PAK_VER = 41
|
||||
|
||||
DEPS = ""
|
||||
|
||||
@@ -40,6 +40,8 @@ ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
CONFIGURE_FLAGS = --disable-fanotify
|
||||
endif
|
||||
|
||||
DATABASE_DIR = /var/lib/clamav
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
@@ -84,13 +86,14 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP) && ./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/var/ipfire/clamav \
|
||||
--with-dbdir=$(DATABASE_DIR) \
|
||||
$(CONFIGURE_FLAGS)
|
||||
cd $(DIR_APP) && make $(MAKETUNING)
|
||||
cd $(DIR_APP) && make install
|
||||
mkdir -p /usr/share/clamav/
|
||||
chown clamav.clamav -R /usr/share/clamav/
|
||||
mkdir -pv $(DATABASE_DIR)
|
||||
chown clamav.clamav -R $(DATABASE_DIR)
|
||||
rm -rfv $(DATABASE_DIR)/*.cvd
|
||||
cp -rf $(DIR_SRC)/config/clamav/* /var/ipfire/clamav/
|
||||
rm -rfv /usr/share/clamav/*.cvd
|
||||
mkdir -p /var/run/clamav
|
||||
chown clamav:clamav /var/run/clamav
|
||||
#install initscripts
|
||||
|
||||
@@ -12,12 +12,12 @@ case "$1" in
|
||||
|
||||
COUNTER=0
|
||||
while [ "$COUNTER" -lt "61" ]; do
|
||||
[ -e "/usr/share/clamav/main.cvd" ] && \
|
||||
[ -e "/usr/share/clamav/daily.cvd" ] || \
|
||||
[ -e "/usr/share/clamav/daily.cld" ] && \
|
||||
[ -e "/var/lib/clamav/main.cvd" ] && \
|
||||
[ -e "/var/lib/clamav/daily.cvd" ] || \
|
||||
[ -e "/var/lib/clamav/daily.cld" ] && \
|
||||
break
|
||||
if [ "$COUNTER" -lt "1" ]; then
|
||||
boot_mesg -n "Download db "
|
||||
boot_mesg -n "Downloading database"
|
||||
else
|
||||
boot_mesg -n "."
|
||||
fi
|
||||
@@ -46,7 +46,7 @@ case "$1" in
|
||||
stop)
|
||||
boot_mesg "Stopping Clamav Definition Updater..."
|
||||
killproc /usr/bin/freshclam
|
||||
rm -rf /usr/share/clamav/*.tmp
|
||||
rm -rf /var/lib/clamav/*.tmp
|
||||
|
||||
boot_mesg "Stopping Clamav Daemon..."
|
||||
killproc /usr/sbin/clamd
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
mv /usr/share/clamav /usr/share/clamav-update
|
||||
mv /var/lib/clamav /var/lib/clamav-update
|
||||
./uninstall.sh
|
||||
mv /usr/share/clamav-update /usr/share/clamav
|
||||
mv /var/lib/clamav-update /var/lib/clamav
|
||||
./install.sh
|
||||
|
||||
Reference in New Issue
Block a user