Commit | Line | Data |
---|---|---|
25767e9e RG |
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 | ||
465522a0 RG |
46 | # Due to a console sub system bug doing the kill -1 of syslogd |
47 | # will lock up the console. This has been disabled until that | |
48 | # is fixed. | |
49 | # | |
50 | #echo "Rotating messages:" | |
51 | #cd /var/log | |
52 | #if [ -f messages.2 ]; then mv -f messages.2 messages.3; fi | |
53 | #if [ -f messages.1 ]; then mv -f messages.1 messages.2; fi | |
54 | #if [ -f messages.0 ]; then mv -f messages.0 messages.1; fi | |
55 | #mv -f messages messages.0 | |
56 | #cp /dev/null messages | |
57 | #chmod 644 messages | |
58 | #kill -1 `cat /var/run/syslog.pid` | |
59 | #cd / | |
25767e9e RG |
60 | |
61 | echo "" | |
62 | echo "Rebuilding locate database:" | |
63 | echo /usr/libexec/locate.updatedb | nice -5 su -m nobody 2>/dev/null |