Page MenuHomeFreeBSD

D46475.id142587.diff
No OneTemporary

D46475.id142587.diff

diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh
--- a/usr.bin/locate/locate/updatedb.sh
+++ b/usr.bin/locate/locate/updatedb.sh
@@ -45,10 +45,11 @@
if ! TMPDIR=`mktemp -d $TMPDIR/locateXXXXXXXXXX`; then
exit 1
fi
+tmp=$TMPDIR/_updatedb$$
+trap 'rc=$?; rm -f $tmp; rmdir $TMPDIR; trap - 0; exit $?' 0 1 2 3 5 10 15
PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH
-
: ${mklocatedb:=locate.mklocatedb} # make locate database program
: ${FCODES:=/var/db/locate.database} # the database
: ${SEARCHPATHS="/"} # directories to be put in the database
@@ -87,9 +88,6 @@
done
fi
-tmp=$TMPDIR/_updatedb$$
-trap 'rm -f $tmp; rmdir $TMPDIR' 0 1 2 3 5 10 15
-
# search locally
if $find -s $SEARCHPATHS $excludes -or -print 2>/dev/null |
$mklocatedb -presort > $tmp

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 5:57 PM (24 m, 1 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11233662
Default Alt Text
D46475.id142587.diff (822 B)

Event Timeline