[BACK]Return to weekly CVS log [TXT][DIR] Up to [local] / src / etc

Annotation of src/etc/weekly, Revision 1.2

1.1       deraadt     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:
1.2     ! david      12: if [ -f /etc/weekly.local ];then
        !            13:        echo ""
        !            14:        echo "Running weekly.local:"
        !            15:        . /etc/weekly.local
        !            16: fi
        !            17:
1.1       deraadt    18: #echo ""
                     19: #echo "Removing old .o files:"
                     20: #find /usr/src -name '*.o' -atime +21 -print -a -exec rm -f {} \;
                     21:
                     22: # see if /usr/src exists and is local
                     23: # before looking there for checked-out files
                     24:
                     25: #if [ -d /usr/src -a \
                     26: #  X"`find -f /usr/src ! -fstype local -prune -or -type d -print -prune`" != X ];
                     27: #then
                     28: #      echo "looking for checked out files:"
                     29: #      TDIR=/tmp/_checkout$$
                     30: #
                     31: #      mkdir $TDIR
                     32: #      for file in `find -f /usr/src ! -fstype local -prune -or \
                     33: #          -name 'p.*' -print | egrep 'SCCS/p\.'`; do
                     34: #              owner=`awk '{ print $3 }' $file`
                     35: #              echo "$owner    $file"
                     36: #              echo $file >> $TDIR/$owner
                     37: #      done | sed -e 's,SCCS/p.,,'
                     38: #      for file in $TDIR/*; do
                     39: #              sed -e 's,SCCS/p.,,' $file | \
                     40: #                  Mail -s 'checked out files' `basename $file`
                     41: #      done
                     42: #      rm -rf $TDIR
                     43: #fi
                     44:
                     45: if [ -f /usr/lib/uucp/clean.weekly ]; then
                     46:        echo ""
                     47:        echo "Cleaning up UUCP:"
                     48:        echo /usr/lib/uucp/clean.weekly | su daemon
                     49: fi
                     50: echo ""
                     51:
                     52: # Rotation of message log now handled automatically by cron and 'newsyslog'
                     53:
                     54: echo ""
                     55: if [ -f /var/db/locate.database ]; then
                     56:        echo "Rebuilding locate database:"
                     57:        chmod 644 /var/db/locate.database
                     58:        chown nobody.nobody /var/db/locate.database
                     59:        echo /usr/libexec/locate.updatedb | nice -5 su -m nobody 2>/dev/null
                     60:        chown root.wheel /var/db/locate.database
                     61: else
                     62:        echo "Not rebuilding locate database; no /var/db/locate.database"
                     63: fi