9.2.82 Script Error
Posted: 21 Apr 2022, 00:33
Hi Team,
Gateway config script error since update.
This series of scripts error due to formatting
:if ([/system script find name=ipResolve] != "") do={/system script remove ipResolve}
add name=ipResolve policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive source="\
#:local SERVERPPTP [resolve ]\r\n
\r\n
#:if ([/interface pptp-client get 0 connect-to] != \$SERVERPPTP) do={\r\n
# /interface pptp-client set 0 connect-to=\$SERVERPPTP\r\n
# :log info \"Updated ip server pptp: \$SERVERPPTP\"\r\n
#}"
Vs one that worked
:if ([/system script find name=ipResolve] != "") do={/system script remove ipResolve}
add name=ipResolve policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive \
source=":local SERVERPPTP [resolve vpn.hq.net.nz]\r\
\n\r\
\n:if ([/interface pptp-client get 0 connect-to] != \$SERVERPPTP) do={\r\
\n /interface pptp-client set 0 connect-to=\$SERVERPPTP \r\
\n :log info \"Updated ip server pptp: \$SERVERPPTP\"\r\
\n}"
Note the breaking space \r\n on the new script vs the breaking on the old script \n\r\
I note this is not resolved on latest, are you aware?
Gateway config script error since update.
This series of scripts error due to formatting
:if ([/system script find name=ipResolve] != "") do={/system script remove ipResolve}
add name=ipResolve policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive source="\
#:local SERVERPPTP [resolve ]\r\n
\r\n
#:if ([/interface pptp-client get 0 connect-to] != \$SERVERPPTP) do={\r\n
# /interface pptp-client set 0 connect-to=\$SERVERPPTP\r\n
# :log info \"Updated ip server pptp: \$SERVERPPTP\"\r\n
#}"
Vs one that worked
:if ([/system script find name=ipResolve] != "") do={/system script remove ipResolve}
add name=ipResolve policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive \
source=":local SERVERPPTP [resolve vpn.hq.net.nz]\r\
\n\r\
\n:if ([/interface pptp-client get 0 connect-to] != \$SERVERPPTP) do={\r\
\n /interface pptp-client set 0 connect-to=\$SERVERPPTP \r\
\n :log info \"Updated ip server pptp: \$SERVERPPTP\"\r\
\n}"
Note the breaking space \r\n on the new script vs the breaking on the old script \n\r\
I note this is not resolved on latest, are you aware?