[mrtg-developers] Re: SetEnv processing
Tobias Oetiker
oetiker at ee.ethz.ch
Fri Jul 4 00:00:21 MEST 2003
Today Alexander Rokhlin wrote:
> Hi,
>
> It looks like MRTG fails to process SetEnv option correctly.
> If a variable in the list equals to empty string, MRTG adds two double
> quotes and a white space ("" ) to the beginning of the next variable name.
> E.g.
> SetEnv[TargetName]:MRTG_INT_IP="" MRTG_INT_DESCR="" XXX="YYY"
> produces the following result:
> "" XXX=YYY (two double quotes and a white space are added in the
> beginning of environment variable name)
> instead of expected:
> XXX=YYY
Alex,
you might want to try to change line 317 in the mrtg script from
while ( $line =~ s/([^=]+)=\"([^\"]+)\"\s*// )
to
while ( $line =~ s/([^=]+)=\"([^\"]*)\"\s*// )
cheers
tobi
--
______ __ _
/_ __/_ / / (_) Oetiker @ ISG.EE, ETZ J97, ETH, CH-8092 Zurich
/ // _ \/ _ \/ / System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/ http://people.ee.ethz.ch/~oetiker +41(0)1-632-5286
--
Unsubscribe mailto:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/mrtg-developers
More information about the mrtg-developers
mailing list