hotspot-to-wpa-cleanup: early exit with :exit

This commit is contained in:
Christian Hesse 2026-01-19 15:17:06 +01:00
parent c26daaf000
commit 0dd4c82108
3 changed files with 6 additions and 12 deletions

View file

@ -12,7 +12,6 @@
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:local ExitOK false;
:onerror Err { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady; :global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
@ -25,8 +24,7 @@
:global ScriptLock; :global ScriptLock;
:if ([ $ScriptLock $ScriptName 10 ] = false) do={ :if ([ $ScriptLock $ScriptName 10 ] = false) do={
:set ExitOK true; :exit;
:error false;
} }
:local DHCPServers ({}); :local DHCPServers ({});
@ -76,5 +74,5 @@
} }
} }
} do={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err; :global ExitOnError; $ExitOnError [ :jobname ] $Err;
} }

View file

@ -13,7 +13,6 @@
# !! This is just a template to generate the real script! # !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered. # !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local ExitOK false;
:onerror Err { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady; :global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
@ -26,8 +25,7 @@
:global ScriptLock; :global ScriptLock;
:if ([ $ScriptLock $ScriptName 10 ] = false) do={ :if ([ $ScriptLock $ScriptName 10 ] = false) do={
:set ExitOK true; :exit;
:error false;
} }
:local DHCPServers ({}); :local DHCPServers ({});
@ -83,5 +81,5 @@
} }
} }
} do={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err; :global ExitOnError; $ExitOnError [ :jobname ] $Err;
} }

View file

@ -12,7 +12,6 @@
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:local ExitOK false;
:onerror Err { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady; :global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
@ -25,8 +24,7 @@
:global ScriptLock; :global ScriptLock;
:if ([ $ScriptLock $ScriptName 10 ] = false) do={ :if ([ $ScriptLock $ScriptName 10 ] = false) do={
:set ExitOK true; :exit;
:error false;
} }
:local DHCPServers ({}); :local DHCPServers ({});
@ -76,5 +74,5 @@
} }
} }
} do={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err; :global ExitOnError; $ExitOnError [ :jobname ] $Err;
} }