I'm trying to create a script which sends WoL packet as soon as an interface becomes active, but it doesn't seem to work without :delay 20 or so. My intention was to loop around the interface until it has running=true condition and then send the packet, but it doesn't seem execute at all.
So I've created a test script like this to debug the problem:
Code: Select all
:log info "START"
:if ([/interface ethernet get [/interface find name="ether2"] running]=true) do={
:log info "COND - ether2 running"
} else= {
:log info "COND - ether2 not active"
}
:log info "END"
I don't want to use :delay at the beginning of the script as it may lead to timing issues, plus I want WoL packet to be send the moment interface is in running state and not with some arbitrary delay.