diff options
author | Stefan Eßer <se@FreeBSD.org> | 2007-10-17 07:27:51 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2007-10-17 07:27:51 +0000 |
commit | afb6c26e9e8d4689f63947a001c84f2d3ffa69f6 (patch) | |
tree | f5bc0fe21579389777c41987b192a72716c8ee64 /usr.bin/locate | |
parent | f60a7dc3556136e869233489db058380a7665f92 (diff) | |
download | src-afb6c26e9e8d4689f63947a001c84f2d3ffa69f6.tar.gz src-afb6c26e9e8d4689f63947a001c84f2d3ffa69f6.zip |
Notes
Diffstat (limited to 'usr.bin/locate')
-rw-r--r-- | usr.bin/locate/locate/locate.rc | 8 | ||||
-rw-r--r-- | usr.bin/locate/locate/updatedb.sh | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/locate/locate/locate.rc b/usr.bin/locate/locate/locate.rc index 2d0f033a636b..54cc6d8c3d87 100644 --- a/usr.bin/locate/locate/locate.rc +++ b/usr.bin/locate/locate/locate.rc @@ -22,5 +22,9 @@ # and if the SEARCHPATHS starts in such a filesystem locate will build # an empty database. # -# be careful if you add 'nfs' -#FILESYSTEMS="ufs ext2fs" +# the default list contains all local file systems that are not synthetic, +# loopback mounts, or read-only, according to lsvfs. +# +# be careful if you add 'nfs' or other network file system types or file +# systems that generally reside on slow or removable devices like cd9660 +#FILESYSTEMS="ufs ext2fs zfs xfs" diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index ea9122f9c998..d828438548c5 100644 --- a/usr.bin/locate/locate/updatedb.sh +++ b/usr.bin/locate/locate/updatedb.sh @@ -52,7 +52,9 @@ PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH : ${FCODES:=/var/db/locate.database} # the database : ${SEARCHPATHS:="/"} # directories to be put in the database : ${PRUNEPATHS:="/tmp /usr/tmp /var/tmp /var/db/portsnap"} # unwanted directories -: ${FILESYSTEMS:="local"} # allowed filesystems +: ${FILESYSTEMS:="$(lsvfs | tail -n +3 | \ + egrep -vw "loopback|network|synthetic|read-only|0" | \ + cut -d " " -f1)"} # allowed filesystems : ${find:=find} case X"$SEARCHPATHS" in |