mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-04-16 18:19:36 +00:00
ipv6-update: support dhcpv6-client-lease script...
... by adding a provide, and handling global variable $DHCPv6ClientLeaseVars.
This commit is contained in:
parent
3a66eb4192
commit
89b9c62e52
3 changed files with 10 additions and 4 deletions
|
|
@ -77,6 +77,7 @@ start with "`ipv6-pool-`" and actual pool name, followed by a comma,
|
||||||
See also
|
See also
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
* [Run other scripts on IPv6 DHCP client lease](dhcpv6-client-lease.md)
|
||||||
* [Run scripts on ppp connection](ppp-on-up.md)
|
* [Run scripts on ppp connection](ppp-on-up.md)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ Just install the script:
|
||||||
See also
|
See also
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
* [Run other scripts on IPv6 DHCP client lease](dhcpv6-client-lease.md)
|
||||||
* [Update configuration on IPv6 prefix change](ipv6-update.md)
|
* [Update configuration on IPv6 prefix change](ipv6-update.md)
|
||||||
* [Update tunnelbroker configuration](update-tunnelbroker.md)
|
* [Update tunnelbroker configuration](update-tunnelbroker.md)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.19
|
# requires RouterOS, version=7.19
|
||||||
|
# provides: dhcpv6-client-lease, order=40
|
||||||
#
|
#
|
||||||
# update firewall and dns settings on IPv6 prefix change
|
# update firewall and dns settings on IPv6 prefix change
|
||||||
# https://rsc.eworm.de/doc/ipv6-update.md
|
# https://rsc.eworm.de/doc/ipv6-update.md
|
||||||
|
|
@ -15,14 +16,17 @@
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
:global EitherOr;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global ParseKeyValueStore;
|
:global ParseKeyValueStore;
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:local NaAddress $"na-address";
|
:global DHCPv6ClientLeaseVars;
|
||||||
:local NaValid $"na-valid";
|
|
||||||
:local PdPrefix $"pd-prefix";
|
:local NaAddress [ $EitherOr $"na-address" ($DHCPv6ClientLeaseVars->"na-address") ];
|
||||||
:local PdValid $"pd-valid";
|
:local NaValid [ $EitherOr $"na-valid" ($DHCPv6ClientLeaseVars->"na-valid") ];
|
||||||
|
:local PdPrefix [ $EitherOr $"pd-prefix" ($DHCPv6ClientLeaseVars->"pd-prefix") ];
|
||||||
|
:local PdValid [ $EitherOr $"pd-valid" ($DHCPv6ClientLeaseVars->"pd-valid") ];
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
:set ExitOK true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue