MFC: The kvm_mkdb(8) is long dead.
Approved by: re (kensmith) Originally by: ru
This commit is contained in:
parent
6ab2ff5d72
commit
862f95b09b
@ -202,11 +202,6 @@ weekly_show_success="YES" # scripts returning 0
|
||||
weekly_show_info="YES" # scripts returning 1
|
||||
weekly_show_badconfig="NO" # scripts returning 2
|
||||
|
||||
# 120.clean-kvmdb
|
||||
weekly_clean_kvmdb_enable="YES" # Clean kvmdb weekly
|
||||
weekly_clean_kvmdb_days=7 # If not accessed for
|
||||
weekly_clean_kvmdb_verbose="YES" # Mention files deleted
|
||||
|
||||
# 310.locate
|
||||
weekly_locate_enable="YES" # Update locate weekly
|
||||
|
||||
|
@ -1,49 +0,0 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# If there is a global system configuration file, suck it in.
|
||||
#
|
||||
if [ -r /etc/defaults/periodic.conf ]; then
|
||||
. /etc/defaults/periodic.conf
|
||||
source_periodic_confs
|
||||
fi
|
||||
|
||||
case "$weekly_clean_kvmdb_enable" in
|
||||
[Yy][Ee][Ss])
|
||||
if [ ! -d /var/db ]
|
||||
then
|
||||
echo '$weekly_clean_kvmdb_enable is set but /var/db' \
|
||||
"doesn't exist"
|
||||
rc=2
|
||||
elif [ -z "$weekly_clean_kvmdb_days" ]
|
||||
then
|
||||
echo '$weekly_clean_kvmdb_enable is set but' \
|
||||
'$weekly_clean_kvmdb_days is not'
|
||||
rc=2
|
||||
else
|
||||
echo ""
|
||||
echo "Cleaning up kernel database files:"
|
||||
|
||||
kernel=`sysctl -n kern.bootfile`
|
||||
kernel=kvm_${kernel##*/}.db
|
||||
|
||||
case "$weekly_clean_kvmdb_verbose" in
|
||||
[Yy][Ee][Ss])
|
||||
print=-print;;
|
||||
*)
|
||||
print=;;
|
||||
esac
|
||||
|
||||
rc=$(find /var/db -name "kvm_*.db" ! -name $kernel \
|
||||
-atime +$weekly_clean_kvmdb_days -delete $print |
|
||||
tee /dev/stderr | wc -l)
|
||||
[ -z "$print" ] && rc=0
|
||||
[ $rc -gt 1 ] && rc=1
|
||||
fi;;
|
||||
|
||||
*) rc=0;;
|
||||
esac
|
||||
|
||||
exit $rc
|
@ -1,7 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
FILES= 120.clean-kvmdb \
|
||||
310.locate \
|
||||
FILES= 310.locate \
|
||||
320.whatis \
|
||||
330.catman \
|
||||
340.noid \
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd March 2, 2006
|
||||
.Dd August 29, 2006
|
||||
.Dt PERIODIC.CONF 5
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -636,23 +636,6 @@ All scripts must be absolute path names.
|
||||
The following variables are used by the standard scripts that reside in
|
||||
.Pa /etc/periodic/weekly :
|
||||
.Bl -tag -offset 4n -width 2n
|
||||
.It Va weekly_clean_kvmdb_enable
|
||||
.Pq Vt bool
|
||||
Set to
|
||||
.Dq YES
|
||||
if you want to purge old
|
||||
.Pa /var/db/kvm_*.db
|
||||
files.
|
||||
The kvm file for the current kernel will not be purged.
|
||||
.It Va weekly_clean_kvmdb_days
|
||||
.Pq Vt num
|
||||
Set to the number of days that the file must not have been accessed
|
||||
before being deleted.
|
||||
.It Va weekly_clean_kvmdb_verbose
|
||||
.Pq Vt bool
|
||||
Set to
|
||||
.Dq YES
|
||||
if you want the removed files to be reported in your weekly output.
|
||||
.It Va weekly_locate_enable
|
||||
.Pq Vt bool
|
||||
Set to
|
||||
|
Loading…
Reference in New Issue
Block a user