On Sat, Nov 23, 2002 at 08:23:18PM -0500, Matthew O. Persico wrote: > >> MANPATH=/opt/perl/lib/perl5/man:/usr/lib/perl5/man > >> > >> Apparently, unlike Solaris and any other *NIX system I have used, > >> MANPATH is not additive - it REPLACES all other heuristics for > >> locating manpages.
Eh? You get exactly the same behaviour under Solaris. man defaults to looking in <somewhere> (see your documentation for the exact location). Setting MANPATH overrides this. > >> Hence, I gained manpages for Perl and lost every > >> other manpage in the system. > >> > >> So, I unset MANPATH and did man man and it said to check out > >> /usr/etc/man.config and man man.conf(5). Well, neither the file nor > >> the manpage exist on my system. Mine (Mandrake 9.0) actually says /usr//etc/man.config. Which by convention tends to me /etc/man.config (stuff// being interpreted as /) > >> > >> How does one ADD man paths to the lookup heuristics? > > > > MANPATH = $MANPATH:/new/dir/goes/here:/another/new/dir > > > This does not work. A default Mandrake install does not initialize > MANPATH at all. By setting MANPATH, I override all the settings in > /etc/man.config. Yes, it's weird. No, I've not seen this in any *NIX > system I've ever worked on. But there it is. You're using a different version of Solaris from me then (and I've got 2.5, 7 and 8). I've always known it to work like this. > > Now, I could, someplace in /etc/profile.d/foobar.sh do this: > > MANPATH=$(manpath) >From the parameter expansion section of the bash manpage: MANPATH=${MANPATH:-<default>}:/new/dir/goes/here:/another/new/dir will do what you want (using <default> if MANPATH isn't set). So the only problem is how to determine the default. Our Solaris setup consists of MANPATH=${MANPATH:-/usr/man}:/usr/local/man However, the Mandrake 8.2 man comes with the manpath command: manpath - determine user's search path for man pages So you can simplify all this to: MANPATH=`manpath`:/new/dir/goes/here -- Tommy
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com