diff options
author | wosch <wosch@FreeBSD.org> | 1998-06-18 09:26:22 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1998-06-18 09:26:22 +0000 |
commit | ee69dd69c584a8a7bd6cb1a59e16ade77758ff6a (patch) | |
tree | efeb2f699696a3832204d7efd7ed8b8d3a0b813f /usr.bin/locate | |
parent | 03956e03bf4d0ff1163421a8e9c7ac0c87414b60 (diff) | |
download | FreeBSD-src-ee69dd69c584a8a7bd6cb1a59e16ade77758ff6a.zip FreeBSD-src-ee69dd69c584a8a7bd6cb1a59e16ade77758ff6a.tar.gz |
Create a save TMPDIR using `mktemp -d'.
Diffstat (limited to 'usr.bin/locate')
-rw-r--r-- | usr.bin/locate/locate/updatedb.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index 38848d7..97c586b 100644 --- a/usr.bin/locate/locate/updatedb.sh +++ b/usr.bin/locate/locate/updatedb.sh @@ -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 |