ppp-on-up: early exit with :exit

This commit is contained in:
Christian Hesse 2026-01-19 15:24:01 +01:00
parent 34ca3fd2ef
commit 19a8ae84ed

View file

@ -8,7 +8,6 @@
# run scripts on ppp up
# https://rsc.eworm.de/doc/ppp-on-up.md
:local ExitOK false;
:onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
@ -21,8 +20,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;
:exit;
}
:local IntName [ /interface/get $Interface name ];
@ -40,5 +38,5 @@
}
}
} do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
:global ExitError; $ExitError false [ :jobname ] $Err;
}