1997-08-16 17:04:02 +00:00
|
|
|
#!/bin/sh -
|
|
|
|
#
|
1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1997-08-16 17:04:02 +00:00
|
|
|
#
|
|
|
|
|
2000-06-23 01:18:31 +00:00
|
|
|
# If there is a global system configuration file, suck it in.
|
|
|
|
#
|
|
|
|
if [ -r /etc/defaults/periodic.conf ]
|
|
|
|
then
|
|
|
|
. /etc/defaults/periodic.conf
|
|
|
|
source_periodic_confs
|
|
|
|
fi
|
1997-08-16 17:04:02 +00:00
|
|
|
|
2000-06-23 01:18:31 +00:00
|
|
|
case "$weekly_whatis_enable" in
|
|
|
|
[Yy][Ee][Ss])
|
2000-09-14 17:19:15 +00:00
|
|
|
echo ""
|
|
|
|
echo "Rebuilding whatis database:"
|
1997-08-16 17:04:02 +00:00
|
|
|
|
2000-09-14 17:19:15 +00:00
|
|
|
MANPATH=`/usr/bin/manpath -q`
|
|
|
|
if [ $? = 0 ]
|
|
|
|
then
|
|
|
|
if [ -z "${MANPATH}" ]
|
2000-06-23 01:18:31 +00:00
|
|
|
then
|
2000-09-14 17:19:15 +00:00
|
|
|
echo "manpath failed to find any manpage directories"
|
|
|
|
rc=3
|
|
|
|
else
|
|
|
|
man_locales=`/usr/bin/manpath -qL`
|
|
|
|
rc=0
|
1999-09-11 18:55:02 +00:00
|
|
|
|
2000-09-14 17:19:15 +00:00
|
|
|
# Build whatis(1) database(s) for original, non-localized
|
|
|
|
# manpages.
|
|
|
|
/usr/libexec/makewhatis.local "${MANPATH}" || rc=3
|
1999-09-11 18:55:02 +00:00
|
|
|
|
2000-09-14 17:19:15 +00:00
|
|
|
# Build whatis(1) database(s) for localized manpages.
|
|
|
|
if [ X"${man_locales}" != X ]
|
|
|
|
then
|
|
|
|
for i in ${man_locales}
|
|
|
|
do
|
2001-03-02 16:52:14 +00:00
|
|
|
LC_ALL=$i /usr/libexec/makewhatis.local -a \
|
2000-09-14 17:19:15 +00:00
|
|
|
-L "${MANPATH}" || rc=3
|
|
|
|
done
|
2000-06-23 01:18:31 +00:00
|
|
|
fi
|
1999-09-11 18:55:02 +00:00
|
|
|
fi
|
2000-09-14 17:19:15 +00:00
|
|
|
else
|
|
|
|
rc=3
|
2000-06-23 01:18:31 +00:00
|
|
|
fi;;
|
2000-09-14 17:19:15 +00:00
|
|
|
|
|
|
|
*) rc=0;;
|
2000-06-23 01:18:31 +00:00
|
|
|
esac
|
2000-09-14 17:19:15 +00:00
|
|
|
|
|
|
|
exit $rc
|