mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
c3f27bf776
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.
18 lines
516 B
Plaintext
18 lines
516 B
Plaintext
#!rsc
|
|
# RouterOS script: ppp-on-up
|
|
# Copyright (c) 2013-2019 Christian Hesse <mail@eworm.de>
|
|
#
|
|
# run scripts on ppp up
|
|
|
|
# variable $interface is available in ppp on-up script
|
|
:local 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;
|
|
/ ipv6 dhcp-client enable $DhcpClient;
|
|
}
|