The kvm_mkdb(8) is long dead.
This commit is contained in:
parent
8a4ebec273
commit
ca7f20f57f
@ -199,11 +199,6 @@ weekly_show_success="YES" # scripts returning 0
|
|||||||
weekly_show_info="YES" # scripts returning 1
|
weekly_show_info="YES" # scripts returning 1
|
||||||
weekly_show_badconfig="NO" # scripts returning 2
|
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
|
# 310.locate
|
||||||
weekly_locate_enable="YES" # Update locate weekly
|
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$
|
# $FreeBSD$
|
||||||
|
|
||||||
FILES= 120.clean-kvmdb \
|
FILES= 310.locate \
|
||||||
310.locate \
|
|
||||||
320.whatis \
|
320.whatis \
|
||||||
330.catman \
|
330.catman \
|
||||||
340.noid \
|
340.noid \
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd March 2, 2006
|
.Dd August 29, 2006
|
||||||
.Dt PERIODIC.CONF 5
|
.Dt PERIODIC.CONF 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -607,23 +607,6 @@ All scripts must be absolute path names.
|
|||||||
The following variables are used by the standard scripts that reside in
|
The following variables are used by the standard scripts that reside in
|
||||||
.Pa /etc/periodic/weekly :
|
.Pa /etc/periodic/weekly :
|
||||||
.Bl -tag -offset 4n -width 2n
|
.Bl -tag -offset 4n -width 2n
|
||||||
.It Va weekly_clean_kvmdb_enable
|
|
||||||
.Pq Vt bool
|
|
||||||
Set to
|
|
||||||
.Dq Li 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 Li YES
|
|
||||||
if you want the removed files to be reported in your weekly output.
|
|
||||||
.It Va weekly_locate_enable
|
.It Va weekly_locate_enable
|
||||||
.Pq Vt bool
|
.Pq Vt bool
|
||||||
Set to
|
Set to
|
||||||
|
Loading…
Reference in New Issue
Block a user