2 # Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/92-update-freshclam
3 # Purpose: update freshclam database
4 # Authors: (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 ################################################################################
9 if ifclass NO_ONLINE ; then
10 echo "Ignoring script 92-update-freshclam as NO_ONLINE is set."
14 if ! ifclass FRESHCLAM ; then
15 echo "Ignoring script 92-update-freshclam as FRESHCLAM is NOT set."
16 echo "Executing freshclam increases the ISO for ~70MB, not considering as default."
23 if [ "${1:-}" = "124" ] ; then
24 echo "Warning: freshclam returned with exit code 124." >&2
27 echo "Warning: freshclam returned with exit code 124."
28 echo "-> This might happen when the incremental daily update failed to run, and"
29 echo " retrieving the full daily.cvd failed as well."
30 echo " This is known to be a problem in automated builds causing build errors."
31 echo " Therefore we are ignoring this issue."
32 echo " If a fresh clamav database is important for you, execute freshclam in the chroot."
40 [ -x $target/usr/bin/timeout ] && TIMEOUT="10" || TIMEOUT=""
42 if ! [ -x $target/usr/bin/freshclam ] ; then
43 echo "freshclam not installed"
47 echo "Updating clamav database via running freshclam"
48 if [ -n "$TIMEOUT" ] ; then
49 $ROOTCMD timeout $TIMEOUT /usr/bin/freshclam
52 $ROOTCMD /usr/bin/freshclam
56 ## END OF FILE #################################################################
57 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2