weekly revision 1.3 1 #!/bin/sh -
2 #
3 # @(#)weekly 5.14 (Berkeley) 6/23/91
4 #
5
6 PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/libexec
7 export PATH
8
9 host=`hostname -s`
10 echo "Subject: $host weekly run output"
11
12 #echo ""
13 #echo "Removing old .o files:"
14 #find /usr/src -name '*.o' -atime +21 -print -a -exec rm -f {} \;
15
16 # see if /usr/src exists and is local
17 # before looking there for checked-out files
18
19 #if [ -d /usr/src -a \
20 # X"`find -f /usr/src ! -fstype local -prune -or -type d -print -prune`" != X ];
21 #then
22 # echo "looking for checked out files:"
23 # TDIR=/tmp/_checkout$$
24 #
25 # mkdir $TDIR
26 # for file in `find -f /usr/src ! -fstype local -prune -or \
27 # -name 'p.*' -print | egrep 'SCCS/p\.'`; do
28 # owner=`awk '{ print $3 }' $file`
29 # echo "$owner $file"
30 # echo $file >> $TDIR/$owner
31 # done | sed -e 's,SCCS/p.,,'
32 # for file in $TDIR/*; do
33 # sed -e 's,SCCS/p.,,' $file | \
34 # Mail -s 'checked out files' `basename $file`
35 # done
36 # rm -rf $TDIR
37 #fi
38
39 if [ -f /usr/lib/uucp/clean.weekly ]; then
40 echo ""
41 echo "Cleaning up UUCP:"
42 echo /usr/lib/uucp/clean.weekly | su daemon
43 fi
44 echo ""
45
46 # Rotation of message log now handled automatically by cron and 'newsyslog'
47
48 echo ""
49 echo "Rebuilding locate database:"
50 echo /usr/libexec/locate.updatedb | nice -5 su -m nobody 2>/dev/null
51