dhcp-lease-comment: use :onerror for outer block

This commit is contained in:
Christian Hesse 2025-05-06 09:44:23 +02:00
parent 55e07a8a42
commit 5dc6b712e1
4 changed files with 12 additions and 12 deletions

View file

@ -15,7 +15,7 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false;
:do {
:onerror Err {
:local ScriptName [ :jobname ];
:global LogPrint;
@ -38,6 +38,6 @@
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
}
}
} on-error={
:global ExitError; $ExitError $ExitOK [ :jobname ];
} do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}

View file

@ -15,7 +15,7 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false;
:do {
:onerror Err {
:local ScriptName [ :jobname ];
:global LogPrint;
@ -38,6 +38,6 @@
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
}
}
} on-error={
:global ExitError; $ExitError $ExitOK [ :jobname ];
} do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}

View file

@ -16,7 +16,7 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false;
:do {
:onerror Err {
:local ScriptName [ :jobname ];
:global LogPrint;
@ -43,6 +43,6 @@
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
}
}
} on-error={
:global ExitError; $ExitError $ExitOK [ :jobname ];
} do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}

View file

@ -15,7 +15,7 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false;
:do {
:onerror Err {
:local ScriptName [ :jobname ];
:global LogPrint;
@ -38,6 +38,6 @@
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
}
}
} on-error={
:global ExitError; $ExitError $ExitOK [ :jobname ];
} do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}