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_catman_enable" in
|
|
|
|
[Yy][Ee][Ss])
|
2000-09-14 17:19:15 +00:00
|
|
|
if [ ! -d /usr/share/man/cat1 ]
|
2000-06-23 01:18:31 +00:00
|
|
|
then
|
2000-09-14 17:19:15 +00:00
|
|
|
echo '$weekly_catman_enable is set but /usr/share/man/cat1' \
|
|
|
|
"doesn't exist"
|
|
|
|
rc=2
|
|
|
|
else
|
2000-06-23 01:18:31 +00:00
|
|
|
echo ""
|
|
|
|
echo "Reformatting manual pages:"
|
1997-08-17 17:55:45 +00:00
|
|
|
|
2000-06-23 01:18:31 +00:00
|
|
|
MANPATH=`/usr/bin/manpath -q`
|
|
|
|
if [ $? = 0 ]
|
|
|
|
then
|
2000-09-14 17:19:15 +00:00
|
|
|
if [ -z "${MANPATH}" ]
|
2000-06-23 01:18:31 +00:00
|
|
|
then
|
|
|
|
echo "manpath failed to find any manpath directories"
|
2000-09-14 17:19:15 +00:00
|
|
|
rc=3
|
2000-06-23 01:18:31 +00:00
|
|
|
else
|
|
|
|
man_locales=`/usr/bin/manpath -qL`
|
2000-09-14 17:19:15 +00:00
|
|
|
rc=0
|
1999-09-11 18:55:02 +00:00
|
|
|
|
2000-06-23 01:18:31 +00:00
|
|
|
# Preformat original, non-localized manpages
|
2000-09-14 17:19:15 +00:00
|
|
|
echo /usr/libexec/catman.local "$MANPATH" |
|
|
|
|
su -fm man || rc=3
|
1999-09-11 18:55:02 +00:00
|
|
|
|
2000-06-23 01:18:31 +00:00
|
|
|
# Preformat localized manpages.
|
2000-09-14 17:19:15 +00:00
|
|
|
if [ -n "$man_locales" ]
|
2000-06-23 01:18:31 +00:00
|
|
|
then
|
|
|
|
for i in $man_locales
|
|
|
|
do
|
2002-03-05 19:13:05 +00:00
|
|
|
echo /usr/libexec/catman.local -L \
|
|
|
|
"$MANPATH" | LC_ALL=$i su -fm man || rc=3
|
2000-06-23 01:18:31 +00:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
fi
|
2000-09-14 17:19:15 +00:00
|
|
|
else
|
|
|
|
rc=3
|
2000-06-23 01:18:31 +00:00
|
|
|
fi
|
|
|
|
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
|