mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
dhcp-lease-comment: switch to $LogPrint
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
:do {
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
:global LogPrintExit2;
|
||||
:global LogPrint;
|
||||
:global ScriptLock;
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
@@ -32,7 +32,7 @@
|
||||
:set NewComment [ /caps-man/access-list/get $AccessList comment ];
|
||||
}
|
||||
:if ([ :len $NewComment ] != 0 && $LeaseVal->"comment" != $NewComment) do={
|
||||
$LogPrintExit2 info $ScriptName ("Updating comment for DHCP lease " . $LeaseVal->"active-mac-address" . ": " . $NewComment) false;
|
||||
$LogPrint info $ScriptName ("Updating comment for DHCP lease " . $LeaseVal->"active-mac-address" . ": " . $NewComment);
|
||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
:do {
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
:global LogPrintExit2;
|
||||
:global LogPrint;
|
||||
:global ScriptLock;
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
@@ -32,7 +32,7 @@
|
||||
:set NewComment [ /interface/wireless/access-list/get $AccessList comment ];
|
||||
}
|
||||
:if ([ :len $NewComment ] != 0 && $LeaseVal->"comment" != $NewComment) do={
|
||||
$LogPrintExit2 info $ScriptName ("Updating comment for DHCP lease " . $LeaseVal->"active-mac-address" . ": " . $NewComment) false;
|
||||
$LogPrint info $ScriptName ("Updating comment for DHCP lease " . $LeaseVal->"active-mac-address" . ": " . $NewComment);
|
||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
:do {
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
:global LogPrintExit2;
|
||||
:global LogPrint;
|
||||
:global ScriptLock;
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
@@ -37,7 +37,7 @@
|
||||
:set NewComment [ /interface/wireless/access-list/get $AccessList comment ];
|
||||
}
|
||||
:if ([ :len $NewComment ] != 0 && $LeaseVal->"comment" != $NewComment) do={
|
||||
$LogPrintExit2 info $ScriptName ("Updating comment for DHCP lease " . $LeaseVal->"active-mac-address" . ": " . $NewComment) false;
|
||||
$LogPrint info $ScriptName ("Updating comment for DHCP lease " . $LeaseVal->"active-mac-address" . ": " . $NewComment);
|
||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
:do {
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
:global LogPrintExit2;
|
||||
:global LogPrint;
|
||||
:global ScriptLock;
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
@@ -32,7 +32,7 @@
|
||||
:set NewComment [ /interface/wifi/access-list/get $AccessList comment ];
|
||||
}
|
||||
:if ([ :len $NewComment ] != 0 && $LeaseVal->"comment" != $NewComment) do={
|
||||
$LogPrintExit2 info $ScriptName ("Updating comment for DHCP lease " . $LeaseVal->"active-mac-address" . ": " . $NewComment) false;
|
||||
$LogPrint info $ScriptName ("Updating comment for DHCP lease " . $LeaseVal->"active-mac-address" . ": " . $NewComment);
|
||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user