diff options
author | joerg <joerg@FreeBSD.org> | 1994-10-30 18:20:58 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1994-10-30 18:20:58 +0000 |
commit | cdfef10748f89b56326d1d5d0ef48dddb275a450 (patch) | |
tree | 45c23b1a47a22d33a743e7430aa8e2c990f7eede /etc/weekly | |
parent | 8ef66e7d701e632f9ee9b5370663bfee1a063958 (diff) | |
download | FreeBSD-src-cdfef10748f89b56326d1d5d0ef48dddb275a450.zip FreeBSD-src-cdfef10748f89b56326d1d5d0ef48dddb275a450.tar.gz |
daily:
Leave a warning to the sysop if (s)he didn't yet
enable the /tmp cleanup code.
Made `core' in the cleanup template look `*.core'.
Replace `df -k' by `df -k -t local', since the stats
for kernfs, procfs etc. are not of much interest, and
the inclusion of nfs systems might hang the machine (nor is it a
`disk' statistic as the headline's telling).
weekly:
Modified the locate.updatedb part to work even if there's no
database yet; report errors other than `Permission denied' instead
of silently ignoring all of them.
Added functionality to rebuild the whatis database once a week.
Diffstat (limited to 'etc/weekly')
-rw-r--r-- | etc/weekly | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -66,4 +66,22 @@ cd / echo "" echo "Rebuilding locate database:" -echo /usr/libexec/locate.updatedb | nice -5 su -m nobody 2>/dev/null +locdb=/var/db/locate.database +touch ${locdb}; chown nobody ${locdb}; chmod 644 ${locdb} +echo /usr/libexec/locate.updatedb | nice -5 su -m nobody 2>&1 |\ + fgrep -v 'Permission denied' +chmod 444 ${locdb} + +echo "" +echo "Rebuilding whatis database:" +MANPATH=${MANPATH:-/usr/share/man:/usr/X11R6/man:/usr/local/man} + +for mandir in `( IFS=":"; set -- ${MANPATH}; echo $* )` +do + if [ ! -d ${mandir} ] + then + continue + fi + echo "==> ${mandir}" + makewhatis ${mandir} +done |