The location of locate database can change in /etc/locate.rc. But the script of rebuilding locate database, 310.locate, doesn't see the definition in /etc/locate.rc. The location of locate database is hard coded in the script as "locdb=/var/db/locate.database". So, when changed the location of locate database in /etc/locate.rc, it failed to update the locate database. How-To-Repeat: Change the "FCODES" in /etc/locate.rc from the default settings. Then run the /etc/periodic/weekly/310.locate.
Hello, all. Followings works fine for me. Regards, --- /usr/src/etc/periodic/weekly/310.locate 2011-02-26 19:30:50.000000000 +0900 +++ /etc/periodic/weekly/310.locate 2011-09-03 16:37:29.000000000 +0900 @@ -16,7 +16,12 @@ echo "" echo "Rebuilding locate database:" - locdb=/var/db/locate.database + . /etc/locate.rc + if [ 'x' = "x$FCODES" ]; then + locdb=/var/db/locate.database + else + locdb="$FCODES" + fi touch $locdb && rc=0 || rc=3 chown nobody $locdb || rc=3
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".
*** This bug has been marked as a duplicate of bug 124119 ***
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=8019068d7c30e45ad392669a6577e5f1db56421d commit 8019068d7c30e45ad392669a6577e5f1db56421d Author: Wolfram Schneider <wosch@FreeBSD.org> AuthorDate: 2021-10-26 14:59:39 +0000 Commit: Wolfram Schneider <wosch@FreeBSD.org> CommitDate: 2021-10-26 14:59:39 +0000 /etc/periodic/weekly/310.locate must read /etc/locate.rc PR: 160225 Reported by: Hiroaki Abe Reviewed by: se Approved by: se Differential Revision: https://reviews.freebsd.org/D32646 usr.sbin/periodic/etc/weekly/310.locate | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)