aboutsummaryrefslogtreecommitdiff
path: root/etc/periodic/weekly/310.locate
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1997-08-16 17:04:02 +0000
committerPaul Traina <pst@FreeBSD.org>1997-08-16 17:04:02 +0000
commit12c88fdf8b9e7c868a12b1d71f47ce83625b969b (patch)
treeda0ab15971981f96bfc6dfa43990e8cbd58f3583 /etc/periodic/weekly/310.locate
parent3a6424f6be21a3f53bb10416a0debe13ce433bd9 (diff)
downloadsrc-12c88fdf8b9e7c868a12b1d71f47ce83625b969b.tar.gz
src-12c88fdf8b9e7c868a12b1d71f47ce83625b969b.zip
Copy /etc/cron.d to /etc/periodic per-request of many.
This wasn't done with a repository copy because there was no history of any consequence. Flames to me.
Notes
Notes: svn path=/cvs2svn/branches/TRAINA/; revision=28263
Diffstat (limited to 'etc/periodic/weekly/310.locate')
-rwxr-xr-xetc/periodic/weekly/310.locate18
1 files changed, 18 insertions, 0 deletions
diff --git a/etc/periodic/weekly/310.locate b/etc/periodic/weekly/310.locate
new file mode 100755
index 000000000000..cfe37ff1ba6b
--- /dev/null
+++ b/etc/periodic/weekly/310.locate
@@ -0,0 +1,18 @@
+#!/bin/sh -
+#
+# $Id: 310.locate,v 1.1.1.1 1997/08/12 17:51:16 pst Exp $
+#
+locdb=/var/db/locate.database
+
+if [ -x /usr/libexec/locate.updatedb -a -f $locdb ] ; then
+
+ echo ""
+ echo "Rebuilding locate database:"
+
+ touch ${locdb}; chown nobody ${locdb}; chmod 644 ${locdb}
+
+ echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody 2>&1 |\
+ fgrep -v 'Permission denied'
+
+ chmod 444 ${locdb}
+fi