Re: SetEnv processing
Tobias Oetiker <[email protected]> Fri, 4 Jul 2003 00:00:21 +0200 (MEST)
| Newsgroups | gmane.network.mrtg.devel |
|---|---|
| Message-ID | <[email protected]> |
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:[email protected]?subject=unsubscribe
Help mailto:[email protected]?subject=help
Archive http://www.ee.ethz.ch/~slist/mrtg-developers