:global adslinterface
:global oldadslip
:global newadslip
:log error ($"user"."/".$"local-address"."/".$"remote-address"."/".$"caller-id"."/".$"called-id"."/".$"interface")
:log error ($"remote-address")
:global aaa [:pick $"remote-address" 10 13]
:log error $aaa
set adslinterface ("pppoe-out".$aaa)
set oldadslip [ /ip address get [/ip address find interface=$adslinterface] address ]
:log error ("NEWIP" . $newadslip)
:log error ("OLDIP" . $oldadslip)
/interface pppoe-client enable $adslinterface;
:delay 500ms;
set newadslip [ /ip address get [/ip address find interface=$adslinterface] address ]
:while ($oldadslip = $newadslip) do={
:log error ("NEWIP" . $newadslip)
:log error ("OLDIP" . $oldadslip)
/interface pppoe-client enable $adslinterface;
:delay 500ms;
set newadslip [ /ip address get [/ip address find interface=$adslinterface] address ]
}
:log error ("OK!NEWIP" . $newadslip)