[~] root@k7>grep FCODES /etc/locate.rc FCODES="/usr/var/locate/locate.database" [~] root@k7>locate foo locate: database too small: /var/db/locate.database This PR is more a placeholder for me to remember to fix it. Or at least discuss it.
The PR is about that if you change the location of the database in /etc/rc.local, not all locate-related tools (locate(1), /etc/periodic/weekly/310.locate) do follow up on them. The first patch is the 310.locate script, which needs to know that it should initialize the right database. The second patch updates the man-page, adds some more comments to the locate.rc and the patches locate.c file itself to first see if the -d option was given, then if LOCATE_PATH exists in the environment, then checks for the line FCODES in /etc/locate.rc, and then if everything fails it uses _PATH_FCODES value. What do you think of it? -- Edwin Groothuis edwin@freebsd.org http://www.mavetju.org
Responsible Changed From-To: freebsd-bugs->edwin It's mine
For the following conditions Product: Base System, Documentation Status: New, Open, In Progress, UNCONFIRMED Assignee: Former FreeBSD committer Reset to default assignee. Reset status to "Open".
*** Bug 160225 has been marked as a duplicate of this bug. ***
I'm not sure if I like the idea that the c program locate(1) parse a shell like configuration file /etc/locate.rc If you change the path for the locate database in /etc/locate.rc then you can also add the new path to /etc/profile - and we are done.