Sounds like your template file is corrupt.

Check the template file to see if there is a trailing ^M or space on the ECHO 
lines -- possibly it has been messed up by Windows and has the \n at the end of 
the lines changed to \r\n?  Try running dos2unix on the template file which 
should fix it.

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
[email protected]<mailto:[email protected]>
Ph: +64 9 373 7599 ext 86487

________________________________
From: [email protected] 
[[email protected]] on behalf of Arvon 
Griffiths [[email protected]]
Sent: Wednesday, 10 November 2010 10:36 a.m.
To: mrtg
Subject: [mrtg] gvolk's interface-errors.template not working now...

When I run my script:
    ...
    cfgdir="/home/mrtg/cfgs-err"
    workdir="/home/mrtg/workdir"
    router="router1"
    cfgmaker --global "WorkDir:$workdir/" --global "LogFormat: rrdtool" 
--if-template=interface-errors.template '--if-filter=$default && ($if_type==30 
|| $if_type==32)'  --output $cfgdir/$router-err.cfg 
pub...@$router:::::2<mailto:pub...@$router:::::2>
    ...

I get:
    Evaluation of the contents in the file

    interface-errors.template
    gave the error

    "Can't find string terminator "
    ECHO" anywhere before EOF at (eval 13) line 26, <IF_TEMPLATE> line 65.
    "

    Exiting cfgmaker


_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg

Reply via email to