diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-06 10:31:52 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-09 11:49:50 +0100 |
commit | be0548007184bae80dd40b4a6390ababeeb39617 (patch) | |
tree | bfc9507bacc1df166bbb8bc3106b1f7933718e9f | |
parent | 81f59f9894cfd9b29a2366e8a13e124b358dadde (diff) |
ppp-on-up: use $ExitError to indicate unintentional error
-rw-r--r-- | ppp-on-up.rsc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ppp-on-up.rsc b/ppp-on-up.rsc index 337b32d..13b42c7 100644 --- a/ppp-on-up.rsc +++ b/ppp-on-up.rsc @@ -11,6 +11,7 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:local ExitOK false; :do { :local ScriptName [ :jobname ]; @@ -20,6 +21,7 @@ :if ([ :typeof $Interface ] = "nothing") do={ $LogPrint error $ScriptName ("This script is supposed to run from ppp on-up script hook."); + :set ExitOK true; :error false; } @@ -37,4 +39,6 @@ $LogPrint warning $ScriptName ("Running script '" . $ScriptName . "' failed!"); } } -} on-error={ } +} on-error={ + :global ExitError; $ExitError $ExitOK [ :jobname ]; +} |