From 487320ba240f63ef0b1aacaa85dcd5f1d2cee966 Mon Sep 17 00:00:00 2001 From: rzalamena <> Date: Fri, 14 Aug 2015 03:02:07 +0000 Subject: [PATCH] Move locate(1) database build directory back to /tmp and kill non-existent /usr/tmp references. Diff from Craig Skinner via tech@ plus a /usr/tmp removal from me in the updatedb script. ok millert@. --- src/etc/locate.rc | 6 +++--- src/etc/weekly | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/etc/locate.rc b/src/etc/locate.rc index 58760101..268b1436 100644 --- a/src/etc/locate.rc +++ b/src/etc/locate.rc @@ -1,10 +1,10 @@ -# $OpenBSD: locate.rc,v 1.6 2003/09/18 09:20:13 jmc Exp $ +# $OpenBSD: locate.rc,v 1.7 2015/08/14 03:02:07 rzalamena Exp $ # # /etc/locate.rc - command script for updatedb(8) # # temp directory -TMPDIR="/var/tmp" +TMPDIR="/tmp" # the actual database FCODES="/var/db/locate.database" @@ -13,7 +13,7 @@ FCODES="/var/db/locate.database" SEARCHPATHS="/" # directories unwanted in output -PRUNEPATHS="/tmp /var/tmp /usr/tmp" +PRUNEPATHS="/tmp /var/tmp" # filesystems allowed. Beware: a non-listed filesystem will be pruned # and if the SEARCHPATHS starts in such a filesystem locate will build diff --git a/src/etc/weekly b/src/etc/weekly index 97d09adc..d0170ba2 100644 --- a/src/etc/weekly +++ b/src/etc/weekly @@ -1,5 +1,5 @@ # -# $OpenBSD: weekly,v 1.26 2014/04/18 10:00:48 schwarze Exp $ +# $OpenBSD: weekly,v 1.27 2015/08/14 03:02:07 rzalamena Exp $ # # For local additions, create the file /etc/weekly.local. # To get section headers, use the function next_part in weekly.local. @@ -48,7 +48,7 @@ if [ -f /var/db/locate.database ]; then if TMP=`mktemp /var/db/locate.database.XXXXXXXXXX`; then trap 'rm -f $TMP; exit 1' 0 1 15 UPDATEDB="/usr/libexec/locate.updatedb" - echo "${UPDATEDB} --fcodes=- --tmpdir=${TMPDIR:-/var/tmp}" | \ + echo "${UPDATEDB} --fcodes=- --tmpdir=${TMPDIR:-/tmp}" | \ nice -5 su -m nobody 2>/dev/null 1>$TMP if [ -s "$TMP" ]; then chmod 444 $TMP