locate.updatedb(8): improve default search paths with small updates
commit6877ea2d2f7caf9b13202f2524abf3b3cf815b45
authorAaron LI <aly@aaronly.me>
Sat, 10 Mar 2018 04:12:11 +0000 (10 12:12 +0800)
committerAaron LI <aly@aaronly.me>
Sun, 25 Mar 2018 23:49:02 +0000 (26 07:49 +0800)
treeaa143e3e07b69ae45d43c281ae3f44df578bfe26
parent36ad0f356d159f9a99f74f2fd4559443ef9af7f9
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.
usr.bin/locate/locate/locate.rc
usr.bin/locate/locate/updatedb.sh