#!/bin/bash



# getclam... grabs and updates the clamav 
# files 
# after this run clamcheck.sh
#

if [ -z "$*" ] ; then 
	set hda1
fi

for Part in $*  ; do 

if ! df | grep  "/mnt/$Part" > /dev/null ; then 

	# If you want to leave the partition mounted, 
	# then change the line below to 
	# Umount=false
	Umount=umount
	mount /mnt/$Part
else

	Umount=false 
fi

# -r says recursively search all subdirectories.
# -i says only complain about Infected files 
#    (otherwise output can be very verbose)
# 
#    The other option I would suggest would be '-q' instead of '-i'.
#    That notes some problems other than infection, but doesn't list
#    every file scanned (the default).

clamscan -r -i /mnt/$Part

$Umount /mnt/$Part

done
