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 91-update-pciids as NO_ONLINE is set."
17 if [ "${1:-}" = "124" ] ; then
18 echo "Warning: freshclam returned with exit code 124." >&2
21 echo "Warning: freshclam returned with exit code 124."
22 echo "-> This might happen when the incremental daily update failed to run, and"
23 echo " retrieving the full daily.cvd failed as well."
24 echo " This is known to be a problem in automated builds causing build errors."
25 echo " Therefore we are ignoring this issue."
26 echo " If a fresh clamav database is important for you, execute freshclam in the chroot."
34 [ -x $target/usr/bin/timeout ] && TIMEOUT="10" || TIMEOUT=""
36 if ! [ -x $target/usr/bin/freshclam ] ; then
37 echo "freshclam not installed"
41 echo "Updating clamav database via running freshclam"
42 if [ -n "$TIMEOUT" ] ; then
43 $ROOTCMD timeout $TIMEOUT /usr/bin/freshclam
46 $ROOTCMD /usr/bin/freshclam
50 ## END OF FILE #################################################################
51 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2