diff options
author | Christian Hesse <mail@eworm.de> | 2021-02-22 15:14:10 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-02-24 21:51:54 +0100 |
commit | f46db918453dcb8878b9a0de6e122fb0ea2224d9 (patch) | |
tree | 31544a450651d0705ecdea0c3d35e650ef784d67 /ipv6-update | |
parent | b0e52aa2d1baa78fc9d025c0671fea8babba0ec2 (diff) |
global: give script or function name in log messages
Diffstat (limited to 'ipv6-update')
-rw-r--r-- | ipv6-update | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ipv6-update b/ipv6-update index 4f0812c..3223807 100644 --- a/ipv6-update +++ b/ipv6-update @@ -6,16 +6,17 @@ # update firewall and dns settings on IPv6 prefix change # https://git.eworm.de/cgit/routeros-scripts/about/doc/ipv6-update.md +:local 0 "ipv6-update"; :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :local PdPrefix $"pd-prefix"; -:global LogPrintExit; +:global LogPrintExit2; :global ParseKeyValueStore; :if ([ :typeof $PdPrefix ] = "nothing") do={ - $LogPrintExit error "This script is supposed to run from ipv6 dhcp-client." true; + $LogPrintExit2 error $0 ("This script is supposed to run from ipv6 dhcp-client.") true; } :local Pool [ / ipv6 pool get [ find where prefix=$PdPrefix ] name ]; |