[mrtg] Behaviour of PathAdd: and LibAdd:

Steve Shipway s.shipway at auckland.ac.nz
Tue Sep 18 02:48:57 CEST 2012


I've recently (re-)noticed that the LibAdd: and PathAdd: directives can be
used once only.  If you use them twice, then only the second one takes
effect.

 

This is annoying, because you may have multiple directories to add to your
libpath and/or search path, but you cannot have multiple values specified in
one LibAdd/PathAdd definition.

 

PathAdd is not too bad, since you can set PATH before calling mrtg, but
LibAdd not allowing multiple instances is a nuisance - you'd want at least
your RRDTool lib path in there, and then you have no more opportunity to
specify other libraries.

 

I seem to recall that, originally, you could use them multiple times and it
worked; then the MRTG_lib.pm structure was added and now all directives
conform to the 'use once' rule as they are loaded into a hash by the
library.

 

What would be the best solution -

1.       Modify MRTG_lib.pm to identify multiple use of these directives,
and push the values into @INC or $ENV{PATH} straight away, or

2.       Allow multiple values to be specified (possibly colon separated?)

 

I can see disadvantages with both approaches.

 

For comparison, the Routers2 frontend honors multiple occurrences; however
it has a radically different way of parsing the cfg files. :P

 

Steve

 

  _____  

Steve Shipway

ITS Unix Services Design Lead

University of Auckland, New Zealand

Floor 1, 58 Symonds Street, Auckland

Phone: +64 (0)9 3737599 ext 86487

DDI: +64 (0)9 924 6487

Mobile: +64 (0)21 753 189

Email:  <mailto:s.shipway at auckland.ac.nz> s.shipway at auckland.ac.nz

P Please consider the environment before printing this e-mail 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20120918/adae0ffb/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5900 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20120918/adae0ffb/attachment-0001.bin 


More information about the mrtg mailing list