diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-06 15:28:55 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-12 15:27:15 +0100 |
commit | d0af9d62ea6bd3b749d717f223ee424d5962c2af (patch) | |
tree | 8f0423c05b2d4c595c3a30ed00f022359d0a447f | |
parent | b86d6314868596dacdf422db80ef0ff27c61c644 (diff) |
accesslist-duplicates: drop main function, use :do with on-error
-rw-r--r-- | accesslist-duplicates.capsman.rsc | 8 | ||||
-rw-r--r-- | accesslist-duplicates.local.rsc | 8 | ||||
-rw-r--r-- | accesslist-duplicates.template.rsc | 8 | ||||
-rw-r--r-- | accesslist-duplicates.wifi.rsc | 8 |
4 files changed, 12 insertions, 20 deletions
diff --git a/accesslist-duplicates.capsman.rsc b/accesslist-duplicates.capsman.rsc index f781eb3..2ce8302 100644 --- a/accesslist-duplicates.capsman.rsc +++ b/accesslist-duplicates.capsman.rsc @@ -13,8 +13,8 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } -:local Main do={ - :local ScriptName [ :tostr $1 ]; +:do { + :local ScriptName [ :jobname ]; :local Seen ({}); @@ -31,6 +31,4 @@ } :set ($Seen->$Mac) 1; } -} - -$Main [ :jobname ]; +} on-error={ } diff --git a/accesslist-duplicates.local.rsc b/accesslist-duplicates.local.rsc index b235cd1..51ef6f3 100644 --- a/accesslist-duplicates.local.rsc +++ b/accesslist-duplicates.local.rsc @@ -13,8 +13,8 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } -:local Main do={ - :local ScriptName [ :tostr $1 ]; +:do { + :local ScriptName [ :jobname ]; :local Seen ({}); @@ -31,6 +31,4 @@ } :set ($Seen->$Mac) 1; } -} - -$Main [ :jobname ]; +} on-error={ } diff --git a/accesslist-duplicates.template.rsc b/accesslist-duplicates.template.rsc index c65e9e0..770fb30 100644 --- a/accesslist-duplicates.template.rsc +++ b/accesslist-duplicates.template.rsc @@ -14,8 +14,8 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } -:local Main do={ - :local ScriptName [ :tostr $1 ]; +:do { + :local ScriptName [ :jobname ]; :local Seen ({}); @@ -40,6 +40,4 @@ } :set ($Seen->$Mac) 1; } -} - -$Main [ :jobname ]; +} on-error={ } diff --git a/accesslist-duplicates.wifi.rsc b/accesslist-duplicates.wifi.rsc index 04ac19c..65f8aaa 100644 --- a/accesslist-duplicates.wifi.rsc +++ b/accesslist-duplicates.wifi.rsc @@ -13,8 +13,8 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } -:local Main do={ - :local ScriptName [ :tostr $1 ]; +:do { + :local ScriptName [ :jobname ]; :local Seen ({}); @@ -31,6 +31,4 @@ } :set ($Seen->$Mac) 1; } -} - -$Main [ :jobname ]; +} on-error={ } |