Date: Sat, 12 Oct 1996 06:56:19 -0700 (PDT) From: "Jordan K. Hubbard" <jkh@time.cdrom.com> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/1778: locate.updatedb uses /tmp directory. Message-ID: <199610121356.GAA09482@time.cdrom.com> Resent-Message-ID: <199610121400.HAA01267@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1778 >Category: bin >Synopsis: locate.updatedb uses /tmp directory. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 12 07:00:03 PDT 1996 >Last-Modified: >Originator: Jordan K. Hubbard >Organization: FreeBSD Project >Release: FreeBSD 2.2-961004-SNAP i386 >Environment: A root directory with only 10MB or so free on it. >Description: I've been noticing that my locate database updated have been failing lately, and finally bothered to trace through the log file and notice that it was dying on a /: file system full. It seems to me that TMPDIR should default to /var/tmp for such a temp-space hungry application as this, rather than /tmp. >How-To-Repeat: Have a close-to-full root filesystem and wait for 2am. :-) >Fix: Index: locate/concatdb.sh =================================================================== RCS file: /home/ncvs/src/usr.bin/locate/locate/concatdb.sh,v retrieving revision 1.2 diff -u -r1.2 concatdb.sh --- concatdb.sh 1996/08/27 20:04:24 1.2 +++ concatdb.sh 1996/10/12 13:54:01 @@ -39,7 +39,8 @@ umask 077 # protect temp files -: ${TMPDIR=/tmp}; export TMPDIR; +# Try /var/tmp first and let it fall back to /tmp if not found. +: ${TMPDIR=/var/tmp}; export TMPDIR; if test X"$TMPDIR" = X -o ! -d "$TMPDIR"; then TMPDIR=/tmp; export TMPDIR fi Index: locate/mklocatedb.sh =================================================================== RCS file: /home/ncvs/src/usr.bin/locate/locate/mklocatedb.sh,v retrieving revision 1.2 diff -u -r1.2 mklocatedb.sh --- mklocatedb.sh 1996/08/27 20:04:25 1.2 +++ mklocatedb.sh 1996/10/12 13:54:23 @@ -38,7 +38,8 @@ umask 077 # protect temp files -: ${TMPDIR=/tmp}; export TMPDIR; +# Try /var/tmp first and let it fall back to /tmp if not found. +: ${TMPDIR=/var/tmp}; export TMPDIR; if test X"$TMPDIR" = X -o ! -d "$TMPDIR"; then TMPDIR=/tmp; export TMPDIR fi Index: locate/updatedb.sh =================================================================== RCS file: /home/ncvs/src/usr.bin/locate/locate/updatedb.sh,v retrieving revision 1.4 diff -u -r1.4 updatedb.sh --- updatedb.sh 1996/08/27 20:04:28 1.4 +++ updatedb.sh 1996/10/12 13:55:00 @@ -68,7 +68,7 @@ done;; esac -tmp=${TMPDIR=/tmp}/_updatedb$$ +tmp=${TMPDIR=/var/tmp}/_updatedb$$ trap 'rm -f $tmp' 0 1 2 3 5 10 15 # search locally >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610121356.GAA09482>