1#!/bin/sh - 2# 3# 4 5# If there is a global system configuration file, suck it in. 6# 7if [ -r /etc/defaults/periodic.conf ] 8then 9 . /etc/defaults/periodic.conf 10 source_periodic_confs 11fi 12 13case "$weekly_locate_enable" in 14 [Yy][Ee][Ss]) 15 echo "" 16 echo "Rebuilding locate database:" 17 18 . /etc/locate.rc 19 : ${FCODES:="/var/db/locate.database"} 20 locdb="$FCODES" 21 22 touch $locdb && rc=0 || rc=3 23 chown nobody $locdb || rc=3 24 chmod 644 $locdb || rc=3 25 26 cd / 27 echo /usr/libexec/locate.updatedb | nice -n 5 su -fm nobody || rc=3 28 chmod 444 $locdb || rc=3;; 29 30 *) rc=0;; 31esac 32 33exit $rc 34