From 2d3de6c99977fa6f480aef0549f8bdfd9620e8c7 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Fri, 14 May 1999 10:18:43 +0000 Subject: [PATCH] Don't overwrite the variable LOCATE_CONFIG This is useful for people who want index their home directory: $ env LOCATE_CONFIG=$HOME/.locate.rc /usr/libexec/locate.updatedb Submitted by: Dmitry Morozovsky --- usr.bin/locate/locate/locate.updatedb.8 | 8 +++++++- usr.bin/locate/locate/updatedb.sh | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/usr.bin/locate/locate/locate.updatedb.8 b/usr.bin/locate/locate/locate.updatedb.8 index 69d992b11e0..d94aa3e9e1b 100644 --- a/usr.bin/locate/locate/locate.updatedb.8 +++ b/usr.bin/locate/locate/locate.updatedb.8 @@ -54,8 +54,14 @@ the default database .It Pa /etc/locate.rc the configuration file .El +.Sh ENVIRONMENT +.Bl -tag -width /var/db/locate.databas -compact +.It Pa LOCATE_CONFIG +path to the the configuration file +.El .Sh SEE ALSO -.Xr locate 1 +.Xr locate 1 , +.Xr periodic 8 .Rs .%A Woods, James A. .%D 1983 diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index 4de9e8840da..e42102c116e 100644 --- a/usr.bin/locate/locate/updatedb.sh +++ b/usr.bin/locate/locate/updatedb.sh @@ -26,9 +26,9 @@ # # updatedb - update locate database for local mounted filesystems # -# $Id: updatedb.sh,v 1.12 1998/11/29 14:46:35 wosch Exp $ +# $Id: updatedb.sh,v 1.13 1999/02/28 20:40:19 ache Exp $ -LOCATE_CONFIG="/etc/locate.rc" +: ${LOCATE_CONFIG="/etc/locate.rc"} if [ -f "$LOCATE_CONFIG" -a -r "$LOCATE_CONFIG" ]; then . $LOCATE_CONFIG fi