Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

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