freebsd-dev/etc/periodic/weekly/120.clean-kvmdb
Bruce Evans 7083bd1e7d Don't test for executability of /usr/sbin/sysctl [before execing
plain sysctl].  We already assumed that many standard commands
exist, and sysctl is not special.
1998-01-01 09:04:47 +00:00

16 lines
336 B
Bash
Executable File

#!/bin/sh -
#
# $Id: 120.clean-kvmdb,v 1.1.1.1 1997/08/16 17:04:02 pst Exp $
#
if [ -d /var/db ] ; then
echo ""
echo "Cleaning up kernel database files:"
kernel=`sysctl -n kern.bootfile`
kernel=kvm_`basename ${kernel}`.db
find /var/db -name "kvm_*.db" -a ! -name ${kernel} -a \
-atime +7 -exec rm -f -- {} \;
fi