mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-01 17:12:46 +00:00
Create a save TMPDIR using `mktemp -d'.
This commit is contained in:
parent
2f92c56cc3
commit
a2f2188044
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37049
@ -26,7 +26,7 @@
|
||||
#
|
||||
# updatedb - update locate database for local mounted filesystems
|
||||
#
|
||||
# $Id: updatedb.sh,v 1.9 1998/03/08 15:28:37 wosch Exp $
|
||||
# $Id: updatedb.sh,v 1.10 1998/03/08 16:09:31 wosch Exp $
|
||||
|
||||
LOCATE_CONFIG="/etc/locate.rc"
|
||||
if [ -f "$LOCATE_CONFIG" -a -r "$LOCATE_CONFIG" ]; then
|
||||
@ -36,7 +36,10 @@ fi
|
||||
# The directory containing locate subprograms
|
||||
: ${LIBEXECDIR:=/usr/libexec}; export LIBEXECDIR
|
||||
: ${TMPDIR:=/var/tmp}; export TMPDIR
|
||||
test -d "$TMPDIR" || TMPDIR=/var/tmp
|
||||
if TMPDIR=`mktemp -d $TMPDIR/locateXXXXXX`; then :
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH
|
||||
|
||||
@ -84,3 +87,5 @@ then
|
||||
exit 1
|
||||
esac
|
||||
fi
|
||||
rm -f $tmp
|
||||
rmdir $TMPDIR
|
||||
|
Loading…
Reference in New Issue
Block a user