mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-21 00:19:32 +00:00
ppp-on-up: early exit with :exit
This commit is contained in:
parent
34ca3fd2ef
commit
19a8ae84ed
1 changed files with 2 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue