From be5b6e0687be98cbfefc7d381ab54e4577a670b0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 5 Mar 2020 08:34:33 +0100 Subject: dhcp-lease-comment: use $LogPrintExit --- dhcp-lease-comment.capsman | 4 +++- dhcp-lease-comment.local | 4 +++- dhcp-lease-comment.template | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dhcp-lease-comment.capsman b/dhcp-lease-comment.capsman index e5da51f..5a5d98b 100644 --- a/dhcp-lease-comment.capsman +++ b/dhcp-lease-comment.capsman @@ -6,6 +6,8 @@ # # !! Do not edit this file, it is generated from template! +:global LogPrintExit; + :foreach Lease in=[ / ip dhcp-server lease find where dynamic=yes status=bound ] do={ :local LeaseVal [ / ip dhcp-server lease get $Lease ]; :local NewComment; @@ -14,7 +16,7 @@ :set NewComment [ / caps-man access-list get $AccessList comment ]; } :if ([ :len $NewComment ] != 0 && $LeaseVal->"comment" != $NewComment) do={ - :log info ("Updating comment for DHCP lease " . $LeaseVal->"mac-address" . ": " . $NewComment); + $LogPrintExit info ("Updating comment for DHCP lease " . $LeaseVal->"mac-address" . ": " . $NewComment) false; / ip dhcp-server lease set comment=$NewComment $Lease; } } diff --git a/dhcp-lease-comment.local b/dhcp-lease-comment.local index 367ca0b..eb74dab 100644 --- a/dhcp-lease-comment.local +++ b/dhcp-lease-comment.local @@ -6,6 +6,8 @@ # # !! Do not edit this file, it is generated from template! +:global LogPrintExit; + :foreach Lease in=[ / ip dhcp-server lease find where dynamic=yes status=bound ] do={ :local LeaseVal [ / ip dhcp-server lease get $Lease ]; :local NewComment; @@ -14,7 +16,7 @@ :set NewComment [ / interface wireless access-list get $AccessList comment ]; } :if ([ :len $NewComment ] != 0 && $LeaseVal->"comment" != $NewComment) do={ - :log info ("Updating comment for DHCP lease " . $LeaseVal->"mac-address" . ": " . $NewComment); + $LogPrintExit info ("Updating comment for DHCP lease " . $LeaseVal->"mac-address" . ": " . $NewComment) false; / ip dhcp-server lease set comment=$NewComment $Lease; } } diff --git a/dhcp-lease-comment.template b/dhcp-lease-comment.template index 3734ba4..bcbb39a 100644 --- a/dhcp-lease-comment.template +++ b/dhcp-lease-comment.template @@ -7,6 +7,8 @@ # !! This is just a template! Replace '%PATH%' with 'caps-man' # !! or 'interface wireless'! +:global LogPrintExit; + :foreach Lease in=[ / ip dhcp-server lease find where dynamic=yes status=bound ] do={ :local LeaseVal [ / ip dhcp-server lease get $Lease ]; :local NewComment; @@ -15,7 +17,7 @@ :set NewComment [ / %PATH% access-list get $AccessList comment ]; } :if ([ :len $NewComment ] != 0 && $LeaseVal->"comment" != $NewComment) do={ - :log info ("Updating comment for DHCP lease " . $LeaseVal->"mac-address" . ": " . $NewComment); + $LogPrintExit info ("Updating comment for DHCP lease " . $LeaseVal->"mac-address" . ": " . $NewComment) false; / ip dhcp-server lease set comment=$NewComment $Lease; } } -- cgit v1.2.3-70-g09d2