From e6fc8ae382bc54b02177c856a5c712e385eed189 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 19 Jan 2026 15:17:06 +0100 Subject: [PATCH] hotspot-to-wpa-cleanup: early exit with :exit --- hotspot-to-wpa-cleanup.capsman.rsc | 6 ++---- hotspot-to-wpa-cleanup.template.rsc | 6 ++---- hotspot-to-wpa-cleanup.wifi.rsc | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/hotspot-to-wpa-cleanup.capsman.rsc b/hotspot-to-wpa-cleanup.capsman.rsc index 35275313..2a988944 100644 --- a/hotspot-to-wpa-cleanup.capsman.rsc +++ b/hotspot-to-wpa-cleanup.capsman.rsc @@ -12,7 +12,6 @@ # # !! Do not edit this file, it is generated from template! -:local ExitOK false; :onerror Err { :global GlobalConfigReady; :global GlobalFunctionsReady; :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ @@ -25,8 +24,7 @@ :global ScriptLock; :if ([ $ScriptLock $ScriptName 10 ] = false) do={ - :set ExitOK true; - :error false; + :exit; } :local DHCPServers ({}); @@ -76,5 +74,5 @@ } } } do={ - :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; + :global ExitError; $ExitError false [ :jobname ] $Err; } diff --git a/hotspot-to-wpa-cleanup.template.rsc b/hotspot-to-wpa-cleanup.template.rsc index 398f194f..290aee52 100644 --- a/hotspot-to-wpa-cleanup.template.rsc +++ b/hotspot-to-wpa-cleanup.template.rsc @@ -13,7 +13,6 @@ # !! This is just a template to generate the real script! # !! Pattern '%TEMPL%' is replaced, paths are filtered. -:local ExitOK false; :onerror Err { :global GlobalConfigReady; :global GlobalFunctionsReady; :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ @@ -26,8 +25,7 @@ :global ScriptLock; :if ([ $ScriptLock $ScriptName 10 ] = false) do={ - :set ExitOK true; - :error false; + :exit; } :local DHCPServers ({}); @@ -83,5 +81,5 @@ } } } do={ - :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; + :global ExitError; $ExitError false [ :jobname ] $Err; } diff --git a/hotspot-to-wpa-cleanup.wifi.rsc b/hotspot-to-wpa-cleanup.wifi.rsc index 17b9e545..6ed60e87 100644 --- a/hotspot-to-wpa-cleanup.wifi.rsc +++ b/hotspot-to-wpa-cleanup.wifi.rsc @@ -12,7 +12,6 @@ # # !! Do not edit this file, it is generated from template! -:local ExitOK false; :onerror Err { :global GlobalConfigReady; :global GlobalFunctionsReady; :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ @@ -25,8 +24,7 @@ :global ScriptLock; :if ([ $ScriptLock $ScriptName 10 ] = false) do={ - :set ExitOK true; - :error false; + :exit; } :local DHCPServers ({}); @@ -76,5 +74,5 @@ } } } do={ - :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; + :global ExitError; $ExitError false [ :jobname ] $Err; }