summaryrefslogtreecommitdiffstats
path: root/usr.bin/locate
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-01-12 08:01:01 +0000
committerkris <kris@FreeBSD.org>2000-01-12 08:01:01 +0000
commit75d9577e300a89dcebc1bae14c895ebc4e113a4f (patch)
treef74c2d513ec77246c877ae58bd88cd40ff0a42ae /usr.bin/locate
parent2ef1bf84237e02ed89219bd01b051b13f3d493bc (diff)
downloadFreeBSD-src-75d9577e300a89dcebc1bae14c895ebc4e113a4f.zip
FreeBSD-src-75d9577e300a89dcebc1bae14c895ebc4e113a4f.tar.gz
Use mktemp(1) for tempfiles (concatdb.sh), and increase the number of X's.
Diffstat (limited to 'usr.bin/locate')
-rw-r--r--usr.bin/locate/locate/concatdb.sh2
-rw-r--r--usr.bin/locate/locate/mklocatedb.sh2
-rw-r--r--usr.bin/locate/locate/updatedb.sh2
3 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/locate/locate/concatdb.sh b/usr.bin/locate/locate/concatdb.sh
index 75c6832..156f21a 100644
--- a/usr.bin/locate/locate/concatdb.sh
+++ b/usr.bin/locate/locate/concatdb.sh
@@ -56,7 +56,7 @@ case $# in
esac
-bigrams=$TMPDIR/_concatdb$$.bigrams
+bigrams=`mktemp ${TMPDIR=/tmp}/_bigrams.XXXXXXXXXX` || exit 1
trap 'rm -f $bigrams' 0 1 2 3 5 10 15
for db
diff --git a/usr.bin/locate/locate/mklocatedb.sh b/usr.bin/locate/locate/mklocatedb.sh
index 4df3afa..f0a5434 100644
--- a/usr.bin/locate/locate/mklocatedb.sh
+++ b/usr.bin/locate/locate/mklocatedb.sh
@@ -39,7 +39,7 @@ umask 077 # protect temp files
: ${TMPDIR:=/tmp}; export TMPDIR
test -d "$TMPDIR" || TMPDIR=/tmp
-if ! TMPDIR=`mktemp -d $TMPDIR/mklocateXXXXXX`; then
+if ! TMPDIR=`mktemp -d $TMPDIR/mklocateXXXXXXXXXX`; then
exit 1
fi
diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh
index fbf1e61..361e72d 100644
--- a/usr.bin/locate/locate/updatedb.sh
+++ b/usr.bin/locate/locate/updatedb.sh
@@ -36,7 +36,7 @@ fi
# The directory containing locate subprograms
: ${LIBEXECDIR:=/usr/libexec}; export LIBEXECDIR
: ${TMPDIR:=/tmp}; export TMPDIR
-if ! TMPDIR=`mktemp -d $TMPDIR/locateXXXXXX`; then
+if ! TMPDIR=`mktemp -d $TMPDIR/locateXXXXXXXXXX`; then
exit 1
fi
OpenPOWER on IntegriCloud