OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 02-Aug-2004 20:08:50
Branch: HEAD Handle: 2004080219084900
Modified files:
openpkg-src/uvscan rc.uvscan uvscan.spec
Log:
download only if necessary and allow checking every 15 minutes
Summary:
Revision Changes Path
1.3 +20 -5 openpkg-src/uvscan/rc.uvscan
1.203 +1 -1 openpkg-src/uvscan/uvscan.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/uvscan/rc.uvscan
============================================================================
$ cvs diff -u -r1.2 -r1.3 rc.uvscan
--- openpkg-src/uvscan/rc.uvscan 23 May 2004 11:19:41 -0000 1.2
+++ openpkg-src/uvscan/rc.uvscan 2 Aug 2004 18:08:49 -0000 1.3
@@ -17,27 +17,42 @@
sed -e 's;^.*\(dat-[0-9][0-9]*\.tar\).*$;\1;'`
uvscan_tmpdir=`echo "${uvscan_datfile}" | sed -e 's;\.tar$;;'`
+ # determine old (installed) and new (available) versions
+ uvscan_version_new=`echo "${uvscan_datfile}" | sed -e 's;^dat-;;' -e
's;\.tar$;;'`
+ uvscan_version_old=`(cat "${uvscan_datadir}/VERSION") 2>/dev/null`
+ if [ ".${uvscan_version_new}" = ".${uvscan_version_old}" ]; then
+ # still no need for updating
+ return 0
+ fi
+
# download and unpack latest DATs
umask 077
- cd ${uvscan_datadir} || exit 1
+ cd ${uvscan_datadir} || return 1
rm -f ${uvscan_datfile} >/dev/null 2>&1 || true
@l_prefix@/bin/curl -s -o ${uvscan_datfile} \
- ${uvscan_dat}/${uvscan_datfile} || exit 1
+ ${uvscan_dat}/${uvscan_datfile} || return 1
rm -rf ${uvscan_tmpdir} >/dev/null 2>&1 || true
mkdir ${uvscan_tmpdir}
- ( cd ${uvscan_tmpdir} && @l_prefix@/bin/tar -xf ../${uvscan_datfile} ) ||
exit 1
+ ( cd ${uvscan_tmpdir} && \
+ @l_prefix@/bin/tar -xf ../${uvscan_datfile}
+ ) || return 1
# update DAT repository by installing updated DAT files
@l_prefix@/lib/openpkg/shtool install -m 644 -o @l_musr@ -g @l_mgrp@ \
${uvscan_tmpdir}/*.dat .
- uvscan_version=`echo "${uvscan_datfile}" | sed -e 's;^dat-;;' -e
's;\.tar$;;'`
- echo "${uvscan_version}" >VERSION
+ echo "${uvscan_version_new}" >VERSION
# cleanup
rm -f ${uvscan_datfile} >/dev/null 2>&1 || true
rm -rf ${uvscan_tmpdir} >/dev/null 2>&1 || true
}
+%quarterly -u @l_musr@
+ rcService uvscan enable yes || exit 0
+ if [ ".$uvscan_update" = .quarterly ]; then
+ uvscan_update || exit $?
+ fi
+
%hourly -u @l_musr@
rcService uvscan enable yes || exit 0
if [ ".$uvscan_update" = .hourly ]; then
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/uvscan/uvscan.spec
============================================================================
$ cvs diff -u -r1.202 -r1.203 uvscan.spec
--- openpkg-src/uvscan/uvscan.spec 29 Jul 2004 06:10:45 -0000 1.202
+++ openpkg-src/uvscan/uvscan.spec 2 Aug 2004 18:08:49 -0000 1.203
@@ -39,7 +39,7 @@
Group: Filesystem
License: Commercial/Free-Trial
Version: %{V_engine}.%{V_datfiles}
-Release: 20040729
+Release: 20040802
# list of sources
Source0: ftp://ftp.mcafee.com/pub/antivirus/datfiles/4.x/dat-%{V_datfiles}.tar
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]