diff options
author | sef <sef@FreeBSD.org> | 1997-12-13 18:18:12 +0000 |
---|---|---|
committer | sef <sef@FreeBSD.org> | 1997-12-13 18:18:12 +0000 |
commit | 4146eb94bcfe2d03d355b729d83ca4edab69dc1e (patch) | |
tree | cd9b9fc71dbd6b1e07cb6b626cc036e84b22c27c /usr.bin/locate | |
parent | d4b20a0f9a924fbb05d82b6c2c1236bdc03e7e82 (diff) | |
download | FreeBSD-src-4146eb94bcfe2d03d355b729d83ca4edab69dc1e.zip FreeBSD-src-4146eb94bcfe2d03d355b729d83ca4edab69dc1e.tar.gz |
Allow TMPDIR to be set and actually *used*; if it not set, it defaults
to /tmp.
Diffstat (limited to 'usr.bin/locate')
-rw-r--r-- | usr.bin/locate/locate/concatdb.sh | 4 | ||||
-rw-r--r-- | usr.bin/locate/locate/mklocatedb.sh | 4 | ||||
-rw-r--r-- | usr.bin/locate/locate/updatedb.sh | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/locate/locate/concatdb.sh b/usr.bin/locate/locate/concatdb.sh index f40c7b3..dd16230 100644 --- a/usr.bin/locate/locate/concatdb.sh +++ b/usr.bin/locate/locate/concatdb.sh @@ -30,7 +30,7 @@ # # Sequence of databases is important. # -# $Id$ +# $Id: concatdb.sh,v 1.5 1997/02/22 19:55:45 peter Exp $ # The directory containing locate subprograms : ${LIBEXECDIR=/usr/libexec}; export LIBEXECDIR @@ -39,7 +39,7 @@ PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH umask 077 # protect temp files -: ${TMPDIR=/tmp}; export TMPDIR; +TMPDIR=${TMPDIR:-/tmp}; export TMPDIR; if test X"$TMPDIR" = X -o ! -d "$TMPDIR"; then TMPDIR=/tmp; export TMPDIR fi diff --git a/usr.bin/locate/locate/mklocatedb.sh b/usr.bin/locate/locate/mklocatedb.sh index e2b4fa7..4021dfc 100644 --- a/usr.bin/locate/locate/mklocatedb.sh +++ b/usr.bin/locate/locate/mklocatedb.sh @@ -28,7 +28,7 @@ # # usage: mklocatedb [-presort] < filelist > database # -# $Id$ +# $Id: mklocatedb.sh,v 1.4 1997/02/22 19:55:49 peter Exp $ # The directory containing locate subprograms @@ -38,7 +38,7 @@ PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH umask 077 # protect temp files -: ${TMPDIR=/tmp}; export TMPDIR; +TMPDIR=${TMPDIR:-/tmp}; export TMPDIR if test X"$TMPDIR" = X -o ! -d "$TMPDIR"; then TMPDIR=/tmp; export TMPDIR fi diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index e2622da..d0e4b62 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$ +# $Id: updatedb.sh,v 1.7 1997/02/22 19:55:49 peter Exp $ LOCATE_CONFIG="/etc/locate.rc" if [ -f "$LOCATE_CONFIG" -a -r "$LOCATE_CONFIG" ]; then @@ -35,7 +35,10 @@ fi # The directory containing locate subprograms : ${LIBEXECDIR=/usr/libexec}; export LIBEXECDIR -: ${TMPDIR=/tmp}; export TMPDIR +TMPDIR=${TMPDIR:-/tmp}; export TMPDIR +if test X"$TMPDIR" = X -o ! -d "$TMPDIR"; then + TMPDIR=/tmp; export TMPDIR +fi PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH |