Bug 27833

Summary: No man page for locate.rc
Product: Documentation Reporter: opentrax <opentrax>
Component: Books & ArticlesAssignee: Mark Linimon <linimon>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description opentrax 2001-06-02 10:20:01 UTC
locate.updatedb(8) says the locate db can be controlled by
/etc/locate.rc. There is no example rc file, nor is locate.rc 
documented in a man page.

Fix: 

Since locate.updatedb is a shell script, here are some notes to get
a man page started. Documenter please note you may
verify these notes by reading /usr/libexec/locate.updatedb
---------------------
/etc/locate.rc can be used to change the default behaviour
of locate.updatedb(8). Since, /usr/libexec/locate.updatedb is
a shell script, there are several parameters which
can be overwritten.  The following issues effect the out
come, or may give cause to use locate.rc:

o...Your system mounts more that ufs (Unix File System).
o...locate.updatedb support programs are not stored in 
    /usr/libexec:/bin:/usr/bin, or ${PATH} of user running 
    locate.updatedb
o...The database is not stored in the usual location (/var/db)
o...You want to setup locate(1) for a diskless system, systems that
    are chroot(2|8)'d, or systems that the default root directory is
    not '/'.
o...You want to exclude world readable directories, other than
    the usual temporary directories. (/tmp /usr/tmp /var/tmp)
o...You want to create a locate(1) database for a mountable
    file system, like nfs or cdrom.


Again, with the following parameters for locate.rc, write them
as sh(1) variables.

	LIBEXECDIR	Directory the subprograms are stored.
	TMPDIR		Temporary directory to use.
	FCODES		Final datbase name.
	SEARCHPATHS	The directories to put in the database.
	PRUNEPATHS	Paths you want to exclude from the database.
	FILESYSTEMS     The types of file systems you want to include.
                        (As a 'find' parameter)

The following parameter should not be changed, but are included
for completeness.

	mklocatedb	The program run to create the datebase.
	find		The program run to create the list of files
                        for the 'mklocatedb' program.

The following example script stores the database in
the file '/var/db/locate.cdrom'. It only searches the
directories below '/cdrom'. And it sets the file system
type to 'rdonly' (read only).
#
# Here is an example for a iso-9660 cdrom 
#
FCODES=/var/db/locate.cdrom
SEARCHPATHS=/cdrom
FILESYSTEMS=rdonly


See Also
	sh(1), locate.db(8), find(1), chroot(2), chroot(8)
Comment 1 Pete Fritchman 2001-06-02 15:20:40 UTC
++ 02/06/01 02:17 -0700 - opentrax@email.com:
| /etc/locate.rc. There is no example rc file, nor is locate.rc 
| documented in a man page.

I have an /etc/locate.rc on 4-STABLE.  As well as
/usr/share/examples/etc/locate.rc.  

-pete

--
Pete Fritchman <petef@databits.net>
Databits Network Services, Inc. <http://databits.net>
finger petef@databits.net for PGP key
Comment 2 Crist J. Clark freebsd_committer freebsd_triage 2001-12-01 09:47:17 UTC
State Changed
From-To: open->analyzed

Either make a new locate.rc(5) or link it to the locate.updatedb(8) 
page and add some info there. But yes, locate.rc should be better 
documented. 


Comment 3 Crist J. Clark freebsd_committer freebsd_triage 2001-12-01 09:47:17 UTC
Responsible Changed
From-To: freebsd-doc->cjc

I am doing some work on the locate(8)-system.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2006-04-03 22:28:56 UTC
State Changed
From-To: analyzed->feedback

Is this still applicable to modern versions of FreeBSD? 


Comment 5 Mark Linimon freebsd_committer freebsd_triage 2006-04-03 22:28:56 UTC
Responsible Changed
From-To: cjc->linimon

Reset PR assigned to inactive committer who has not responded to email.
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2006-04-03 22:55:37 UTC
State Changed
From-To: feedback->closed

Submitter's email address bounces.