Bug 160225 - [periodic] /etc/periodic/weekly/310.locate doesn't see /etc/locate.rc.
Summary: [periodic] /etc/periodic/weekly/310.locate doesn't see /etc/locate.rc.
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 8.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks: 124119
  Show dependency treegraph
 
Reported: 2011-08-27 01:40 UTC by Hiroaki Abe
Modified: 2018-01-08 04:14 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroaki Abe 2011-08-27 01:40:02 UTC
	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.
Comment 1 Hiroaki Abe 2011-09-03 16:32:19 UTC
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
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-01-08 04:14:41 UTC
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".