[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Locate & whatis on new install.
Hi Daniel, hi Marc,
Marc Espie wrote on Sat, Jan 01, 2005 at 10:34:57PM +0100:
> On Sat, Jan 01, 2005 at 03:51:07PM -0500, Daniel Ouellet wrote:
>> Not a big deal really, but a suggestion for the fresh install
>> of OpenBSD in regards to the 'locate' & 'whatis' database.
The OpenBSD install process completes very quickly.
Please do not forget this is a merit in itself.
Building a locate database may take some time,
depending on the hardware you use. Thus, in my humble opinion,
it is a good idea _not_ to build locate.database by default
during the install process.
Keeping things quick and simple is not a bad policy.
> As to mklocatedb, I'm wondering what's the value of a locatedb
> on a fresh install...
Indeed.
> the only place where maybe it makes sense is mentioning this
> in afterboot(8).
Well, it is already nearly mentioned. Quoting afterboot(8):
|| Look at and possibly edit the /etc/daily, /etc/weekly
|| and /etc/monthly scripts.
schwarze@athene $ wc /etc/weekly
40 124 945 /etc/weekly
schwarze@athene $ grep locate /etc/weekly
if [ -f /var/db/locate.database ]; then
TMP=`mktemp /var/db/locate.database.XXXXXXXXXX`
echo "Rebuilding locate database:"
UPDATEDB="/usr/libexec/locate.updatedb"
mv -f $TMP /var/db/locate.database
echo "Not installing locate database; zero size"
echo "Not rebuilding locate database; can't create temp file"
echo "Not rebuilding locate database; no /var/db/locate.database"
Reading this, you will probably issue a command like `ls -al /var/db/`
to see whether this code will actually be executed.
I think afterboot(8) is a notable case of a man page not just intended
for perusal and reference, but to be used as a checklist. It even says
so itself in its very second sentence:
|| This document attempts to list items for the system administrator
|| to check and set up after the installation and first complete boot
|| of the system. The idea is to create a list of items that can be
|| checked off so that you have a warm fuzzy feeling that something
|| obvious has not been missed.
Keeping afterboot(8) short and to the point may not be a bad idea
either, so i'm not sure it needs to be even more explicit than
"Look at and possibly edit /etc/weekly".
By the way, even if you really fail to follow afterboot(8)
and try to use locate straight away, you get the following:
schwarze@selene $ locate murks
database too small: /var/db/locate.database
My typical reaction would be to type `man locate`. The second
sentence in locate(1) reads:
|| The database is recomputed periodically (usually weekly or daily),
While the references in locate(1) are:
|| FILES
|| /etc/weekly script that starts the database rebuild
|| /usr/libexec/locate.updatedb script to update the locate database
|| /var/db/locate.database locate database
||
|| SEE ALSO
|| find(1), fnmatch(3), locate.updatedb(8), weekly(8)
There appears to be very little room for making that more explicit
or less confusing, except perhaps by deleting the two words "or daily".
Yours,
Ingo