mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-22 17:09:33 +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
|
# run scripts on ppp up
|
||||||
# https://rsc.eworm.de/doc/ppp-on-up.md
|
# https://rsc.eworm.de/doc/ppp-on-up.md
|
||||||
|
|
||||||
: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) \
|
||||||
|
|
@ -21,8 +20,7 @@
|
||||||
|
|
||||||
:if ([ :typeof $Interface ] = "nothing") do={
|
:if ([ :typeof $Interface ] = "nothing") do={
|
||||||
$LogPrint error $ScriptName ("This script is supposed to run from ppp on-up script hook.");
|
$LogPrint error $ScriptName ("This script is supposed to run from ppp on-up script hook.");
|
||||||
:set ExitOK true;
|
:exit;
|
||||||
:error false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:local IntName [ /interface/get $Interface name ];
|
:local IntName [ /interface/get $Interface name ];
|
||||||
|
|
@ -40,5 +38,5 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError false [ :jobname ] $Err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue