Is there an easy way to make the daily security checks skip any removable media that may be mounted (always somewhere under /mnt) at the time?
I could schedule a forced umount before the security checks are run, but that would be rather ugly and might actually interfere with running jobs. The other option I can think of is to manually go over all the scripts in /etc/periodic/security, see which ones search the entire filesystem and make those skip /mnt by turning
into
but I was wondering whether there's a simpler, cleaner or more elegant way.
I could schedule a forced umount before the security checks are run, but that would be rather ugly and might actually interfere with running jobs. The other option I can think of is to manually go over all the scripts in /etc/periodic/security, see which ones search the entire filesystem and make those skip /mnt by turning
Code:
MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'`
Code:
MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ && $3 !~ /^\/mnt/ { print $3 }'`