mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-02 09:15:03 +02:00
ppp-on-up: use $ExitError to indicate unintentional error
This commit is contained in:
parent
81f59f9894
commit
be05480071
1 changed files with 5 additions and 1 deletions
|
@ -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 ];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue