diff options
author | Paul Traina <pst@FreeBSD.org> | 1997-08-16 17:04:02 +0000 |
---|---|---|
committer | Paul Traina <pst@FreeBSD.org> | 1997-08-16 17:04:02 +0000 |
commit | 12c88fdf8b9e7c868a12b1d71f47ce83625b969b (patch) | |
tree | da0ab15971981f96bfc6dfa43990e8cbd58f3583 /etc/periodic/weekly | |
parent | 3a6424f6be21a3f53bb10416a0debe13ce433bd9 (diff) | |
download | src-12c88fdf8b9e7c868a12b1d71f47ce83625b969b.tar.gz src-12c88fdf8b9e7c868a12b1d71f47ce83625b969b.zip |
Copy /etc/cron.d to /etc/periodic per-request of many.
This wasn't done with a repository copy because there was no
history of any consequence. Flames to me.
Notes
Notes:
svn path=/cvs2svn/branches/TRAINA/; revision=28263
Diffstat (limited to 'etc/periodic/weekly')
-rwxr-xr-x | etc/periodic/weekly/100.clean-src | 42 | ||||
-rwxr-xr-x | etc/periodic/weekly/120.clean-kvmdb | 15 | ||||
-rwxr-xr-x | etc/periodic/weekly/300.uucp | 12 | ||||
-rwxr-xr-x | etc/periodic/weekly/310.locate | 18 | ||||
-rwxr-xr-x | etc/periodic/weekly/320.whatis | 18 | ||||
-rwxr-xr-x | etc/periodic/weekly/330.catman | 12 | ||||
-rwxr-xr-x | etc/periodic/weekly/999.local | 10 | ||||
-rw-r--r-- | etc/periodic/weekly/Makefile | 11 |
8 files changed, 138 insertions, 0 deletions
diff --git a/etc/periodic/weekly/100.clean-src b/etc/periodic/weekly/100.clean-src new file mode 100755 index 000000000000..230dff1d2941 --- /dev/null +++ b/etc/periodic/weekly/100.clean-src @@ -0,0 +1,42 @@ +#!/bin/sh - +# +# $Id: 100.clean-src,v 1.1.1.1 1997/08/12 17:51:16 pst Exp $ +# +# Clean up /usr/src +# +# This really hasn't been used in generations, it's just here for +# backwards compatibility -- we don't even use SCCS anymore +# + +exit 0 # do not run by default + +# see if /usr/src exists and is local before doing anything + +if [ -d /usr/src -a \ + X"`find -f /usr/src ! -fstype local -prune -or -type d -print -prune`" != X ]; +then + + echo "" + echo "Removing old .o files from /usr/src:" + + find /usr/src -name '*.o' -atime +21 -print -a -exec rm -f {} \; + + echo "looking for checked out files in /usr/src:" + TDIR=/tmp/_checkout$$ + + mkdir $TDIR + + for file in `find -f /usr/src ! -fstype local -prune -or \ + -name 'p.*' -print | egrep 'SCCS/p\.'`; do + owner=`awk '{ print $3 }' $file` + echo "$owner $file" + echo $file >> $TDIR/$owner + done | sed -e 's,SCCS/p.,,' + + for file in $TDIR/*; do + sed -e 's,SCCS/p.,,' $file | \ + Mail -s 'checked out files' `basename $file` + done + + rm -rf $TDIR +fi diff --git a/etc/periodic/weekly/120.clean-kvmdb b/etc/periodic/weekly/120.clean-kvmdb new file mode 100755 index 000000000000..24d8aa2b904a --- /dev/null +++ b/etc/periodic/weekly/120.clean-kvmdb @@ -0,0 +1,15 @@ +#!/bin/sh - +# +# $Id: 120.clean-kvmdb,v 1.1.1.1 1997/08/12 17:51:16 pst Exp $ +# + +if [ -d /var/db -a -x /usr/sbin/sysctl ] ; 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 diff --git a/etc/periodic/weekly/300.uucp b/etc/periodic/weekly/300.uucp new file mode 100755 index 000000000000..eceb2c64f064 --- /dev/null +++ b/etc/periodic/weekly/300.uucp @@ -0,0 +1,12 @@ +#!/bin/sh - +# +# $Id: 300.uucp,v 1.1.1.1 1997/08/12 17:51:16 pst Exp $ +# +# This is really here for backwards compatibility, clean.weekly is not +# created by default anymore. + +if [ -d /var/spool/uucp -a -f /usr/libexec/uucp/clean.weekly ]; then + echo "" + echo "Cleaning up UUCP:" + echo /usr/libexec/uucp/clean.weekly | su daemon +fi diff --git a/etc/periodic/weekly/310.locate b/etc/periodic/weekly/310.locate new file mode 100755 index 000000000000..cfe37ff1ba6b --- /dev/null +++ b/etc/periodic/weekly/310.locate @@ -0,0 +1,18 @@ +#!/bin/sh - +# +# $Id: 310.locate,v 1.1.1.1 1997/08/12 17:51:16 pst Exp $ +# +locdb=/var/db/locate.database + +if [ -x /usr/libexec/locate.updatedb -a -f $locdb ] ; then + + echo "" + echo "Rebuilding locate database:" + + touch ${locdb}; chown nobody ${locdb}; chmod 644 ${locdb} + + echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody 2>&1 |\ + fgrep -v 'Permission denied' + + chmod 444 ${locdb} +fi diff --git a/etc/periodic/weekly/320.whatis b/etc/periodic/weekly/320.whatis new file mode 100755 index 000000000000..6ae23a4f9337 --- /dev/null +++ b/etc/periodic/weekly/320.whatis @@ -0,0 +1,18 @@ +#!/bin/sh - +# +# $Id: 320.whatis,v 1.1.1.1 1997/08/12 17:51:16 pst Exp $ +# + +if [ -x /usr/libexec/makewhatis.local -a -d /usr/share/man ] ; then + + echo "" + echo "Rebuilding whatis database:" + + if [ -d /usr/X11R6/man ] ; then + MANPATH=${MANPATH:-/usr/share/man:/usr/X11R6/man:/usr/local/man} + else + MANPATH=${MANPATH:-/usr/share/man:/usr/local/man} + fi + + /usr/libexec/makewhatis.local "${MANPATH}" +fi diff --git a/etc/periodic/weekly/330.catman b/etc/periodic/weekly/330.catman new file mode 100755 index 000000000000..cc2030e7392e --- /dev/null +++ b/etc/periodic/weekly/330.catman @@ -0,0 +1,12 @@ +#!/bin/sh - +# +# $Id: 330.catman,v 1.1.1.1 1997/08/12 17:51:16 pst Exp $ +# + +exit 0 # do not run by default + +if [ -x /usr/libexec/catman.local -a -d /usr/share/man/cat1 ] ; then + echo "" + echo "Reformatting manual pages:" + echo /usr/libexec/catman.local "${MANPATH}" | su -fm man +fi diff --git a/etc/periodic/weekly/999.local b/etc/periodic/weekly/999.local new file mode 100755 index 000000000000..fb9606edb64c --- /dev/null +++ b/etc/periodic/weekly/999.local @@ -0,0 +1,10 @@ +#!/bin/sh - +# +# $Id: 999.local,v 1.1.1.1 1997/08/12 17:51:16 pst Exp $ +# + +if [ -f /etc/weekly.local ]; then + echo "" + echo "Running weekly.local:" + sh /etc/weekly.local +fi diff --git a/etc/periodic/weekly/Makefile b/etc/periodic/weekly/Makefile new file mode 100644 index 000000000000..753b7f6bf014 --- /dev/null +++ b/etc/periodic/weekly/Makefile @@ -0,0 +1,11 @@ +# $Id: Makefile,v 1.2 1997/08/12 23:11:24 adam Exp $ + +BIN= 100.clean-src \ + 120.clean-kvmdb \ + 300.uucp \ + 310.locate \ + 320.whatis \ + 330.catman \ + 999.local + +.include <bsd.prog.mk> |