[mrtg] Include vs require

Steve Shipway s.shipway at auckland.ac.nz
Wed Oct 8 02:54:26 CEST 2008


> > Or, maybe it would be better to add a second parameter to the existing
> include statement:
> >
> > #(This is a required include)
> > Include: filename.cfg
> > #(This is an optional include)
> > Include: filename.cfg optional
> >
> > I think I prefer the second way for backwards compatibility, although
> > it depends on how MRTG currently parses the file.
>
> Either way is going to break if you run on an older version.  The
> current regex will fail to match if there is a second parameter after
> the included file name.

I think this is something we'd have to live with - after all, when the NoHC directive was added for MRTG 2.16 it meant that cfgmaker-generated scripts broken older versions of MRTG.  I'd prefer to extend the existing Include directive rather than add a new directive.

However, whats more important is what Tobi wants to do, I guess :)

Steve



More information about the mrtg mailing list