mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-04 02:04:45 +02:00
global-functions: merge $LogAnd{Error,Put} to $LogPrintExit ...
... and fix logging. Logging with severity from variable (:log $severity ...) is not possible, this is considered a syntax error. Also the 'workaround' with parsing code failed with missing message in log. The reliable code is a lot longer, so merge the two functions to save a lot of duplicate code.
This commit is contained in:
parent
6036edb506
commit
ceaa83b83e
13 changed files with 56 additions and 56 deletions
|
@ -4,13 +4,13 @@
|
|||
#
|
||||
# run scripts on DHCP lease
|
||||
|
||||
:global LogAndError;
|
||||
:global LogPrintExit;
|
||||
|
||||
:if ([ :typeof $leaseActIP ] = "nothing" || \
|
||||
[ :typeof $leaseActMAC ] = "nothing" || \
|
||||
[ :typeof $leaseServerName ] = "nothing" || \
|
||||
[ :typeof $leaseBound ] = "nothing") do={
|
||||
$LogAndError error "This script is supposed to run from ip dhcp-client.";
|
||||
$LogPrintExit error "This script is supposed to run from ip dhcp-client." true;
|
||||
}
|
||||
|
||||
:local Scripts;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue