diff options
author | Christian Hesse <mail@eworm.de> | 2021-07-15 12:47:05 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-07-15 12:47:05 +0200 |
commit | 8e2c783068829c523c3b8fa8835f77f3a6ef56e0 (patch) | |
tree | 5b34965f7735ed276ff2f3991d5eb1eae54de589 /lease-script | |
parent | 9509371690c26bb67918448458f7b2989df4635c (diff) |
lease-script: drop differentiation of assign / deassign...
... not that we have early locking.
Diffstat (limited to 'lease-script')
-rw-r--r-- | lease-script | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lease-script b/lease-script index 3134cb6..6de6fd9 100644 --- a/lease-script +++ b/lease-script @@ -28,11 +28,10 @@ $ScriptLock $0 false 10; $LogPrintExit2 debug $0 ("More invocations are waiting, exiting early.") true; } -:local State ([ $IfThenElse ($leaseBound = 0) "de" "" ] . "assign"); -:local RunOrder [ :toarray "" ]; +$LogPrintExit2 debug $0 ("DHCP Server " . $leaseServerName . " " . [ $IfThenElse ($leaseBound = 0) \ + "de" "" ] . "assigned lease " . $leaseActIP . " to " . $leaseActMAC) false; -$LogPrintExit2 debug $0 ("DHCP Server " . $leaseServerName . " " . \ - $State . "ed lease " . $leaseActIP . " to " . $leaseActMAC) false; +:local RunOrder [ :toarray "" ]; :foreach Script in=[ / system script find where source~("\n# provides: lease-script, ") ] do={ :local Name [ / system script get $Script name ]; @@ -42,9 +41,7 @@ $LogPrintExit2 debug $0 ("DHCP Server " . $leaseServerName . " " . \ :set Store [ :pick $Store 0 [ :find $Store "\n" ] ]; :set Store [ $ParseKeyValueStore $Store ]; - :if (($Store->$State) = true) do={ - :set ($RunOrder->($Store->"order")) $Name; - } + :set ($RunOrder->($Store->"order")) $Name; } :foreach Order,Script in=$RunOrder do={ |