Subject: Re: locate.updatedb & Netboot--What, Where, How and sometimes Why
To: None <port-sparc@netbsd.org>
From: Thilo Manske <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: port-sparc
Date: 12/17/2001 16:50:16
On Mon, Dec 17 2001 at 05:35:48 -0800, Derek Warren wrote:
> I've got my SS20 netbooting from my antiquated FreeBSD box.. 
> everything is fine and dandy with the exception of the locate 
> command.  Run /usr/libexec/locate.updatedb and the command fails a 
> few seconds later with no explanation ("locate: updatedb failed"). 
> I've searched the list archives and haven't found any previous 
> questions that even come close to the problem--am I missing something 
> dead obvious to others?
locate.updatedb will not search non-local (+ some other) filesystems.

(The idea is/was probably that if you have a bunch of workstations in a
network and they all run their weekly skript they don't bring the network
down to its knees by each of them walking over all NFS shares).

With root as non-local filesystems it doesn't find any file and thus the
error.

You have to edit /usr/libexec/locate.updatedb to change that behaviour.
Search for a line starting with "find".
That part of the file should look something like this (depending on your
version of NetBSD it might differ a bit):

find -s $SRCHPATHS \( \
	! -fstype local     \
	-o -fstype cd9660   \
	-o -fstype fdesc    \
	-o -fstype kernfs   \
	-o -fstype procfs   \
	\) -a -prune -o -print \
		>> "$FILELIST"

Now remove the "! -fstype local" and the first "-o" so that you'll have:

# search locally or everything
# find -s $SRCHPATHS -print \
find -s $SRCHPATHS \( \
	-fstype cd9660   \
	-o -fstype fdesc    \
	-o -fstype kernfs   \
	-o -fstype procfs   \
	\) -a -prune -o -print \
		>> "$FILELIST"

-- 
Dies ist Thilos Unix Signature! Viel Spass damit.