Browse Source

propagate TMPDIR into locate.updatedb

OPENBSD_2_6
mickey 25 years ago
parent
commit
66d44aa844
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/etc/weekly

+ 3
- 2
src/etc/weekly View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: weekly,v 1.8 1998/02/02 23:08:56 millert Exp $
# $OpenBSD: weekly,v 1.9 1999/08/04 17:55:16 mickey Exp $
# #
PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/libexec PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/libexec
@ -24,7 +24,8 @@ if [ -f /var/db/locate.database ]; then
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
trap 'rm -f $TMP' 0 1 15 trap 'rm -f $TMP' 0 1 15
echo "Rebuilding locate database:" echo "Rebuilding locate database:"
echo "/usr/libexec/locate.updatedb --fcodes=-" | \
UPDATEDB="/usr/libexec/locate.updatedb"
echo "${UPDATEDB} --fcodes=- --tmpdir=${TMPDIR:-/tmp}" | \
nice -5 su -m nobody 2>/dev/null 1>$TMP nice -5 su -m nobody 2>/dev/null 1>$TMP
if [ -s "$TMP" ]; then if [ -s "$TMP" ]; then
chmod 444 $TMP chmod 444 $TMP


Loading…
Cancel
Save