Compare commits

..

2 commits

Author SHA1 Message Date
Christian Hesse
c2d458fa71 ipv6-update: support dhcpv6-client-lease script...
... by adding a provide, and handling global variable
$DHCPv6ClientLeaseVars.
2026-04-14 22:33:20 +02:00
Christian Hesse
0e833b1d87 introduce 'dhcpv6-client-lease' to run scripts on lease 2026-04-14 22:33:20 +02:00
2 changed files with 3 additions and 1 deletions

View file

@ -33,7 +33,8 @@
"na-address"=$"na-address";
"na-valid"=$"na-valid";
"pd-prefix"=$"pd-prefix";
"pd-valid"=$"pd-valid" };
"pd-valid"=$"pd-valid";
"options"=$"options" };
:local RunOrder ({});
:foreach Script in=[ /system/script/find where source~("\n# provides: dhcpv6-client-lease\\b") ] do={

View file

@ -34,6 +34,7 @@ available with a global variable. This code is required in child script:
:local NaValid [ $EitherOr $"na-valid" ($DHCPv6ClientLeaseVars->"na-valid") ];
:local PdPrefix [ $EitherOr $"pd-prefix" ($DHCPv6ClientLeaseVars->"pd-prefix") ];
:local PdValid [ $EitherOr $"pd-valid" ($DHCPv6ClientLeaseVars->"pd-valid") ];
:local Options [ $EitherOr $"options" ($DHCPv6ClientLeaseVars->"options") ];
The values are available under different name then, use `$PdPrefix` instead
of `$"pd-prefix"`, and so on. The resulting script supports both, being a