I need determine whether the script can scan and discovery active PPPoE servers via an interface in order to perform different commands,how to achieve it ? Thanks!
I think I’ve managed to find a workaround of this situation.
The clue is to dump the output from interactive scan tool into text file and do parsing.
:local pppoeInterface "ether1";
:local cmd ("/interface pppoe-client scan interface=".$pppoeInterface." duration=1s");
:execute $cmd file="scanResult";
:delay 1s;
:put [/file get "scanResult.txt" contents];
Then you can do any pick or find from the content of the file.