summaryrefslogtreecommitdiffstats
path: root/etc/periodic/weekly
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1997-08-16 17:04:02 +0000
committerpst <pst@FreeBSD.org>1997-08-16 17:04:02 +0000
commit1d67bc6abbb219a957bf68da4f8eb8e69058f0ba (patch)
tree564f5ee31ac28af72ffa391c4b9fdf67a5bedf7b /etc/periodic/weekly
parent003551adee3fcf367794630d905a06997d9a1dfe (diff)
downloadFreeBSD-src-1d67bc6abbb219a957bf68da4f8eb8e69058f0ba.zip
FreeBSD-src-1d67bc6abbb219a957bf68da4f8eb8e69058f0ba.tar.gz
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.
Diffstat (limited to 'etc/periodic/weekly')
-rwxr-xr-xetc/periodic/weekly/100.clean-src42
-rwxr-xr-xetc/periodic/weekly/120.clean-kvmdb15
-rwxr-xr-xetc/periodic/weekly/300.uucp12
-rwxr-xr-xetc/periodic/weekly/310.locate18
-rwxr-xr-xetc/periodic/weekly/320.whatis18
-rwxr-xr-xetc/periodic/weekly/330.catman12
-rwxr-xr-xetc/periodic/weekly/999.local10
-rw-r--r--etc/periodic/weekly/Makefile11
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 0000000..230dff1
--- /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 0000000..24d8aa2
--- /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 0000000..eceb2c6
--- /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 0000000..cfe37ff
--- /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 0000000..6ae23a4
--- /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 0000000..cc2030e
--- /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 0000000..fb9606e
--- /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 0000000..753b7f6
--- /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>
OpenPOWER on IntegriCloud