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 <marck@rinet.ru>
This commit is contained in:
Wolfram Schneider 1999-05-14 10:18:43 +00:00
parent 372dd86a44
commit 2d3de6c999
2 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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