I have a standard script that I use to configure Mikrotiks in my work.
I'm trying to adapt the script so that would work in ROS6 and ROS7, but i'm not having lucky when testing this part on latest version of ROS7.
The code is supposed to result in error in one of the versions, that's why I'm using "on-error".
The problem is that the error is not being handled as I programmed in code, instead it only shows that that is having an error.
Am I making this wrong? Appreciate the help.
expected end of command (line 6 column 20)
Code: Select all
# NTP
do {
/system
clock set time-zone-name=Greenwich
ntp client set enabled=yes
ntp client set primary-ntp=0.0.0.0
ntp client set secondary-ntp=0.0.0.0
} on-error= { :put "Ignoring - RouterOS v7" }
do {
/system
clock set time-zone-name=Greenwich
ntp client set enabled=yes
ntp client servers add address=0.0.0.0
ntp client servers add address=0.0.0.0
} on-error={ :put "Ignoring - RouterOSv6" }