git: locate.updatedb(8): improve default search paths with small updates
Aaron LI
aly at crater.dragonflybsd.org
Sun Mar 25 16:49:29 PDT 2018
commit 6877ea2d2f7caf9b13202f2524abf3b3cf815b45
Author: Aaron LI <aly at aaronly.me>
Date: Sat Mar 10 12:12:11 2018 +0800
locate.updatedb(8): improve default search paths with small updates
* Make locate.updatedb(8) default to search from all mount points with
the allowed filesystem types. Therefore, it is allowed to exclude the
root filesystem type, while still correctly index other mounted
filesystem with allowed types. Otherwise, the whole filesystem is
simply ignored if the root filesystem type is excluded.
* Although we can now ignore the root filesystem type from being indexed,
but this is generally a configuration mistake, so we warn about this.
* Use stat(1) instead of the obscure "find -c" to help check whether the
created database is empty.
* Print out the full find command by default (to help config/debug), also print
a message when the database is successfully built.
* Update locate.rc accordingly.
* Explain why use cat instead of cp for the final database creation.
Summary of changes:
usr.bin/locate/locate/locate.rc | 17 +++++++++++------
usr.bin/locate/locate/updatedb.sh | 34 +++++++++++++++++++++++++---------
2 files changed, 36 insertions(+), 15 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6877ea2d2f7caf9b13202f2524abf3b3cf815b45
--
DragonFly BSD source repository
More information about the Commits
mailing list