diff --git a/gnu/usr.bin/man/apropos/apropos.sh b/gnu/usr.bin/man/apropos/apropos.sh index 4f68263ce4ec..c6e8e62c5d8d 100644 --- a/gnu/usr.bin/man/apropos/apropos.sh +++ b/gnu/usr.bin/man/apropos/apropos.sh @@ -53,6 +53,14 @@ case X"$PAGER" in X) ;; esac +# If possible check global system configuration file for additional +# man locales installed +if [ -r /etc/defaults/rc.conf ] ; then + . /etc/defaults/rc.conf +elif [ -r /etc/rc.conf ] ; then + . /etc/rc.conf +fi + # search for existing */whatis databases mandir='' for d in $manpath @@ -61,6 +69,17 @@ do then mandir="$mandir $d/$db" fi + + # Check for locailzed manpage subdirectories + if [ "$man_locales" != "NO" ]; then + for l in $man_locales + do + if [ -f "$d/$l/$db" -a -r "$d/$l/$db" ]; + then + mandir="$mandir $d/$l/$db" + fi + done + fi done case X"$mandir" in X)