diff options
Diffstat (limited to 'usr.bin/locate/locate/updatedb.sh')
-rw-r--r-- | usr.bin/locate/locate/updatedb.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index d828438..619180e 100644 --- a/usr.bin/locate/locate/updatedb.sh +++ b/usr.bin/locate/locate/updatedb.sh @@ -52,6 +52,7 @@ 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 +: ${PRUNEDIRS:=".zfs"} # unwanted directories, in any parent : ${FILESYSTEMS:="$(lsvfs | tail -n +3 | \ egrep -vw "loopback|network|synthetic|read-only|0" | \ cut -d " " -f1)"} # allowed filesystems @@ -79,6 +80,14 @@ case X"$PRUNEPATHS" in done;; esac +case X"$PRUNEDIRS" in + X) ;; + *) for dir in $PRUNEDIRS + do + excludes="$excludes -or -name $dir -type d -prune" + done;; +esac + tmp=$TMPDIR/_updatedb$$ trap 'rm -f $tmp; rmdir $TMPDIR' 0 1 2 3 5 10 15 |