lease-script: drop the delay magic...

... as this should be handled by $ScriptLock in lease scripts now.
This commit is contained in:
Christian Hesse 2021-06-28 00:16:13 +02:00
parent 08b1b72fa9
commit 5f2bc87b22

View file

@ -12,7 +12,6 @@
:global IfThenElse; :global IfThenElse;
:global LogPrintExit2; :global LogPrintExit2;
:global RandomDelay;
:if ([ :typeof $leaseActIP ] = "nothing" || \ :if ([ :typeof $leaseActIP ] = "nothing" || \
[ :typeof $leaseActMAC ] = "nothing" || \ [ :typeof $leaseActMAC ] = "nothing" || \
@ -26,11 +25,6 @@
$LogPrintExit2 debug $0 ("DHCP Server " . $leaseServerName . " " . \ $LogPrintExit2 debug $0 ("DHCP Server " . $leaseServerName . " " . \
$State . "ed lease " . $leaseActIP . " to " . $leaseActMAC) false; $State . "ed lease " . $leaseActIP . " to " . $leaseActMAC) false;
# delay a moment to update the lease table, do not run in parallel for de/assign...
:delay ((1 + $leaseBound) . "s");
# ... or simultaneous deassign
$RandomDelay (([ :tonum $leaseBound ] ^ 1) * 750) "ms";
:foreach Script in=[ / system script find where source~("\n# provides: lease-script " . $State . "\n") ] do={ :foreach Script in=[ / system script find where source~("\n# provides: lease-script " . $State . "\n") ] do={
:local ScriptName [ / system script get $Script name ]; :local ScriptName [ / system script get $Script name ];
:do { :do {