If you read changelogs, help and forum, you learn that actually, on actual stable version, netwatch dhcp, ppp, etc.[..] DHCPv6 script section the global variable is not created nor set [..]
sciripts are runned on different user that can't interac with global variables, and other restricted permissions.
Second rule:Code:[...] numbers=1 [...]
Never use numbers and similar on script.
(The first is never use variables name like parameters name, not this case.)
The correct form is something like do={/ip dns static set [:find where <<something that matches the correct DNS record>>] address=$i3}
What is it for? It's like writing uselessly anywhere in the script (1+1).Code:[...]; :toarray $i2;[...]
Is useless, $i2 is already one array, but the correct form, if of any utility is [...]; :set i2 [:toarray $i2];[...]
All this just for [...]:foreach i in=[find where mac-address="AA:BB:CC:DD:EE:FF" and address~"^fe80"] do={ [...] } ?Code:[...]:foreach i in=[find where mac-address="AA:BB:CC:DD:EE:FF"] do={:local i2 [get $i]; :toarray $i2; :local i3 [:pick $i2 1]; :if ($i3 ~"^fe80") do={ [...] }}
(however, not the correct way)
The forum is full of correct examples.
Statistics: Posted by rextended — Mon Dec 30, 2024 10:13 am