mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-20 10:57:51 +02:00
global: give script or function name in log messages
This commit is contained in:
parent
b0e52aa2d1
commit
f46db91845
46 changed files with 262 additions and 212 deletions
|
@ -6,16 +6,17 @@
|
|||
# run scripts on DHCP lease
|
||||
# https://git.eworm.de/cgit/routeros-scripts/about/doc/lease-script.md
|
||||
|
||||
:local 0 "lease-script";
|
||||
:global GlobalFunctionsReady;
|
||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||
|
||||
:global LogPrintExit;
|
||||
:global LogPrintExit2;
|
||||
|
||||
:if ([ :typeof $leaseActIP ] = "nothing" || \
|
||||
[ :typeof $leaseActMAC ] = "nothing" || \
|
||||
[ :typeof $leaseServerName ] = "nothing" || \
|
||||
[ :typeof $leaseBound ] = "nothing") do={
|
||||
$LogPrintExit error "This script is supposed to run from ip dhcp-server." true;
|
||||
$LogPrintExit2 error $0 ("This script is supposed to run from ip dhcp-server.") true;
|
||||
}
|
||||
|
||||
:local Scripts;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue