>Number:         179570
>Category:       misc
>Synopsis:       New version of /etc/periodic/weekly/330.catman
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 15 12:10:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Doug Barton
>Release:        DNA
>Organization:
AAAG
>Environment:
DNA
>Description:
This is a new version of 330.catman. It simplifies the code quite a bit, and 
pre-creates the necessary cat directories so that the script will not fail if 
they do not exist. The latter problem is especially noticeable with Perl ports.

If someone can show the output of 'manpath -qL' when locales are in use, and 
explain how that output relates to the directories under $MANPATH, it should be 
fairly simple to replicate the cat directory creation routine for them.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

#!/bin/sh -
#
# $FreeBSD: release/9.1.0/etc/periodic/weekly/330.catman 208060 2010-05-14 
04:53:57Z dougb $
#

# 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

case "$weekly_catman_enable" in
[Yy][Ee][Ss])
        echo ''
        MANPATH=`/usr/bin/manpath -q`
        if [ -z "${MANPATH}" ]
        then
                echo 'manpath failed to find any MANPATH directories'
                exit 2
        fi

        echo 'Ensuring that necessary cat directories exist'

        oldIFS="$IFS" ; IFS=':'
        for path in ${MANPATH}
        do
                cd "$path" || exit 3
                for m in man*
                do
                        install -d -o man -g wheel -m 755 cat${m#man} || exit 3
                done
        done
        IFS="$oldIFS"

        echo 'Reformatting manual pages:'

        # Preformat original, non-localized manpages
        su -fm man /usr/libexec/catman.local -r "$MANPATH" || exit 3

        # Preformat localized manpages
        man_locales=`/usr/bin/manpath -qL`
        for l in $man_locales
        do
                LC_ALL=$l su -fm man /usr/libexec/catman.local -Lr "$MANPATH" ||
                    exit 3
        done ;;
*)      ;;
esac

exit 0


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to