diff options
author | Christian Hesse <mail@eworm.de> | 2020-03-05 08:34:33 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-03-05 08:34:33 +0100 |
commit | be5b6e0687be98cbfefc7d381ab54e4577a670b0 (patch) | |
tree | e5cfc8cb183ba3b83418885eaefe5cc2dc68cdf7 /dhcp-lease-comment.template | |
parent | 3127800496410a9f316e22c57485e83a6c2fe193 (diff) |
dhcp-lease-comment: use $LogPrintExit
Diffstat (limited to 'dhcp-lease-comment.template')
-rw-r--r-- | dhcp-lease-comment.template | 4 |
1 files changed, 3 insertions, 1 deletions
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; } } |