I've just tested the latest version (2.9.27): Tobias Oetiker wrote: : looking over the code it seems to at least try to work like this: : : > --------------------------------------------- : > First example: everything is set up: : > : > PageTop[^]: PageTop-prefix : > PageTop[$]: PageTop-suffix : > PageTop[_]: PageTop-default : > Target[mytarget]: ... : > PageTop[mytarget]: PageTop-explicit : > : > $ mrtg ./mrtg.cfg && grep PageTop mytarget.html : > PageTop-explicit PageTop-suffix
: > : PageTop = PageTop-prefix PageTop-explicit PageTop-suffix It works like I wrote. I have a patch for this, but I am not sure it does not break anything else. Please take look at it. However, from looking at the code I think the config file parsing needs a rewrite - the ^, _ and $ handling is not very straightforward here. : > --------------------------------------------- : > Second example: only the defaults : > : > PageTop[^]: PageTop-prefix : > PageTop[$]: PageTop-suffix : > PageTop[_]: PageTop-default : > Target[mytarget]: ... : > # PageTop[mytarget]: PageTop-explicit : > : > $ mrtg ./mrtg.cfg && grep PageTop mytarget.html : > PageTop-default
: > : > I think the PageTop-prefix and PageTop-suffix should be here. : : PageTop = PageTop-default OK. : > --------------------------------------------- : > Third example: only the defaults; without [_] : > : > PageTop[^]: PageTop-prefix : > PageTop[$]: PageTop-suffix : > # PageTop[_]: PageTop-default : > Target[mytarget]: ... : > # PageTop[mytarget]: PageTop-explicit : > : > $ mrtg ./mrtg.cfg && grep PageTop mytarget.html : > PageTop-prefix
: > : > I think the PageTop-suffix should also be here. : : PageTop = PageTop-prefix PageTop-suffix Works as I wrote even on 2.9.27. I don't have time to write a patch now, but maybe I'll look at it next time. I have another patch, which fixes warning in BER.pm in perl 5.8.0. Please let me know what do you think about it. -Yenya -- | Jan "Yenya" Kasprzak | | GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E | | http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ | |-- If you start doing things because you hate others and want to screw --| |-- them over the end result is bad. --Linus Torvalds to the BBC News --| -- Attached file removed by Ecartis and put at URL below -- -- Type: text/plain -- Desc: MRTG_lib-prefix.diff -- Size: 1k (1340 bytes) -- URL : http://www.ee.ethz.ch/~slist/pantomime/diff1 -- Attached file removed by Ecartis and put at URL below -- -- Type: text/plain -- Desc: BER.pm-warning.diff -- Size: 516 bytes -- URL : http://www.ee.ethz.ch/~slist/pantomime/diff2 -- Unsubscribe mailto:mrtg-request@list.ee.ethz.ch?subject=unsubscribe Archive http://www.ee.ethz.ch/~slist/mrtg FAQ http://faq.mrtg.org Homepage http://www.mrtg.org WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi