From ceaa83b83edb069ecf1cca181ec461519f0cc020 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 26 Feb 2020 14:19:54 +0100 Subject: 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. --- lease-script | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lease-script') diff --git a/lease-script b/lease-script index 9109ea9..1e73b31 100644 --- a/lease-script +++ b/lease-script @@ -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; -- cgit v1.2.3-54-g00ecf