Hello,
I have a scripting problem.
I have two routers, both running ROS version 7.16.1. I make the same settings on both routers, everything is perfect on the first, but I run into problems on the second.
So: There is only one DHCP client configured in the router. I want to switch the “Add default route” part of this dhcp client (from yes to no and vice versa).
There is only this in the script:
/ip dhcp-client set add-default-route=yes 0
If I run this command from the terminal, it does what it needs to do without any errors.
If it is run from a script, I get the following error message: “executing script failed, please check it manually”.
If I rewrite the end of the command from 0 to 1, so:
/ip dhcp-client set add-default-route=yes 1
Then it runs perfectly from the script, without errors, and also sets add-default-route to yes. However, from the terminal, the command gives an error (no such item), which is completely correct, since there is only one dhcp client, so there is no number 1.
If I set the end of the command to 0 in the script back, the script gives an error, but when started the script from the terminal, the script runs without error.
What could be causing this problem?
Thanks,
Szilard