mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
ppp-on-up: fix variable handling
The variable $interface is not a name but a reference... Basically this worked only because of the oddity - the filter did not work and *all* dhcp-clients were disabled and enabled.
This commit is contained in:
parent
870f00bb36
commit
c3f27bf776
1 changed files with 3 additions and 1 deletions
|
@ -6,8 +6,10 @@
|
|||
|
||||
# variable $interface is available in ppp on-up script
|
||||
:local Interface $interface;
|
||||
:local DhcpClient [ / ipv6 dhcp-client find where interface=$Interface ];
|
||||
:local IntName [ / interface get $Interface name ];
|
||||
:log info ("PPP interface " . $IntName . " is up.");
|
||||
|
||||
:local DhcpClient [ / ipv6 dhcp-client find where interface=$IntName ];
|
||||
:if ([ :len $DhcpClient ] > 0) do={
|
||||
/ ipv6 dhcp-client disable $DhcpClient;
|
||||
:delay 1s;
|
||||
|
|
Loading…
Reference in a new issue