aboutsummaryrefslogtreecommitdiffstats
path: root/lease-script
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-02-22 15:14:10 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-02-24 21:51:54 +0100
commitf46db918453dcb8878b9a0de6e122fb0ea2224d9 (patch)
tree31544a450651d0705ecdea0c3d35e650ef784d67 /lease-script
parentb0e52aa2d1baa78fc9d025c0671fea8babba0ec2 (diff)
global: give script or function name in log messages
Diffstat (limited to 'lease-script')
-rw-r--r--lease-script5
1 files changed, 3 insertions, 2 deletions
diff --git a/lease-script b/lease-script
index a39a874..28f9e20 100644
--- a/lease-script
+++ b/lease-script
@@ -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;