Most of the time, man indexes don't actually need to be rebuilt. The attached
change to /lib/svc/method/update-man-index should (I think) only update the
directories (if any) that are not current, so that most of the time, it
finishes in a second or so rather than a couple of minutes (less clutter in
svcs -xv shortly after system comes up).
If someone wants to review it and if they like it, commit it, that'd be cool.
*** /lib/svc/method/update-man-index.orig Fri Dec 13 09:29:38 2019
--- /lib/svc/method/update-man-index Tue Sep 21 06:25:19 2021
***************
*** 46,56 ****
MANPATH=
for p in "${!manpath[@]}"; do
! MANPATH+="${MANPATH:+:}$p"
done
! echo "Rebuilding man page index using $MANPATH"
! export MANPATH
! /usr/bin/man -w
exit 0
--- 46,64 ----
MANPATH=
for p in "${!manpath[@]}"; do
! if [ -d "${p}" -a -f "${p}/whatis" ] && [ "$(find "${p}" -newer
"${p}/whatis"|wc -l|tr -d ' ')" == "0" ]; then
! continue # save time, do not reindex manpath element if
current
! else
! MANPATH+="${MANPATH:+:}$p"
! fi
done
! if [ -n "${MANPATH}" ]; then
! echo "Rebuilding man page index using $MANPATH"
! export MANPATH
! /usr/bin/man -w
! else
! echo "man page indexes appear current"
! fi
exit 0
_______________________________________________
openindiana-discuss mailing list
[email protected]
https://openindiana.org/mailman/listinfo/openindiana-discuss