Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: About that horrible polluting mDNS stuff?



On Mon, Nov 29, 2010 at 09:11:14PM +0000, Christos Zoulas wrote:
> In article <alpine.NEB.2.00.1011291851330.29554%galant.ukfsn.org@localhost>,
> Iain Hibbert  <plunky%rya-online.net@localhost> wrote:
> >On Mon, 29 Nov 2010, Robert Elz wrote:
> >
> >> The hysteria all this has generated has been truly amazing.  Next time,
> >> someone please just go read the source.   That's why we have it.  It
> >> isn't a difficult task.
> >
> >Just as an aside, reading the source should not be required to understand
> >configuration options.. Thats why we have manpages.
> 
> This is a joke, right? Because we used to have man pages for ntp until
> it was decided that html was the way to go.

I thought the reason for that is because the man pages were out of date, and
it seemed like unnecessary work to try to sync them up.

Perhaps we need a wrapper around the man command, something like this perhaps?

====man_wrapper====
#!/bin/sh

REAL_MAN=/usr/bin/man
# need getopt here, sort of.
# -k option was not specified
if ! grep -q -- " -k " "$*" > /dev/null 2>&1 ; then
    $REAL_MAN -w "$@" 2> /dev/null
fi
if [ $? -eq 0 ] ; then
    exec $REAL_MAN "$@"
fi

eval lastarg=\$$#
htmldoc="/usr/share/doc/html/${lastarg}/index.html"
if [ -e "${htmldoc}" ] ; then
    if [ -x $(which lynx 2>&1) ] ; then
        exec lynx -vikeys "${htmldoc}"
    else
        echo "lynx is not installed.  Unable to display html docs at $htmldoc"
        exit 1
    fi
fi

exec $REAL_MAN "$@"
====man_wrapper====

eric


Home | Main Index | Thread Index | Old Index