mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-10 05:04:47 +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;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
|
:local ExitOK false;
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
@ -20,6 +21,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;
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,4 +39,6 @@
|
||||||
$LogPrint warning $ScriptName ("Running script '" . $ScriptName . "' failed!");
|
$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