diff --git a/accesslist-duplicates.capsman.rsc b/accesslist-duplicates.capsman.rsc index 27546c8d..00f76aa0 100644 --- a/accesslist-duplicates.capsman.rsc +++ b/accesslist-duplicates.capsman.rsc @@ -11,7 +11,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/accesslist-duplicates.local.rsc b/accesslist-duplicates.local.rsc index 589815d6..8fdeb929 100644 --- a/accesslist-duplicates.local.rsc +++ b/accesslist-duplicates.local.rsc @@ -11,7 +11,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/accesslist-duplicates.template.rsc b/accesslist-duplicates.template.rsc index ccbca3df..d07ad9bb 100644 --- a/accesslist-duplicates.template.rsc +++ b/accesslist-duplicates.template.rsc @@ -12,7 +12,8 @@ # !! Pattern '%TEMPL%' is replaced, paths are filtered. :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/accesslist-duplicates.wifi.rsc b/accesslist-duplicates.wifi.rsc index 527ebb4b..3c676b1d 100644 --- a/accesslist-duplicates.wifi.rsc +++ b/accesslist-duplicates.wifi.rsc @@ -11,7 +11,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/backup-cloud.rsc b/backup-cloud.rsc index c4e23b2a..d8419ce8 100644 --- a/backup-cloud.rsc +++ b/backup-cloud.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/backup-cloud.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/backup-email.rsc b/backup-email.rsc index d0973011..de0f6caa 100644 --- a/backup-email.rsc +++ b/backup-email.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/backup-email.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/backup-partition.rsc b/backup-partition.rsc index 1f0cf2ee..8480c629 100644 --- a/backup-partition.rsc +++ b/backup-partition.rsc @@ -11,7 +11,8 @@ # https://rsc.eworm.de/doc/backup-partition.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/backup-upload.rsc b/backup-upload.rsc index 14c39141..b3f56c24 100644 --- a/backup-upload.rsc +++ b/backup-upload.rsc @@ -11,7 +11,8 @@ # https://rsc.eworm.de/doc/backup-upload.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/capsman-download-packages.capsman.rsc b/capsman-download-packages.capsman.rsc index 25c43f58..ea90c3a0 100644 --- a/capsman-download-packages.capsman.rsc +++ b/capsman-download-packages.capsman.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/capsman-download-packages.template.rsc b/capsman-download-packages.template.rsc index b2698382..5b973423 100644 --- a/capsman-download-packages.template.rsc +++ b/capsman-download-packages.template.rsc @@ -13,7 +13,8 @@ # !! Pattern '%TEMPL%' is replaced, paths are filtered. :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/capsman-download-packages.wifi.rsc b/capsman-download-packages.wifi.rsc index 901bb0af..bbc8babc 100644 --- a/capsman-download-packages.wifi.rsc +++ b/capsman-download-packages.wifi.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/capsman-rolling-upgrade.capsman.rsc b/capsman-rolling-upgrade.capsman.rsc index 791b3dbb..f973c8e7 100644 --- a/capsman-rolling-upgrade.capsman.rsc +++ b/capsman-rolling-upgrade.capsman.rsc @@ -13,7 +13,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/capsman-rolling-upgrade.template.rsc b/capsman-rolling-upgrade.template.rsc index 0b1cc2ba..74142a30 100644 --- a/capsman-rolling-upgrade.template.rsc +++ b/capsman-rolling-upgrade.template.rsc @@ -14,7 +14,8 @@ # !! Pattern '%TEMPL%' is replaced, paths are filtered. :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/capsman-rolling-upgrade.wifi.rsc b/capsman-rolling-upgrade.wifi.rsc index 4afdee2e..57626de3 100644 --- a/capsman-rolling-upgrade.wifi.rsc +++ b/capsman-rolling-upgrade.wifi.rsc @@ -13,7 +13,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/certificate-renew-issued.rsc b/certificate-renew-issued.rsc index 91a48dea..5d984256 100644 --- a/certificate-renew-issued.rsc +++ b/certificate-renew-issued.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/certificate-renew-issued.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/check-certificates.rsc b/check-certificates.rsc index be8e4dff..37bf1cce 100644 --- a/check-certificates.rsc +++ b/check-certificates.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/check-certificates.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/check-health.rsc b/check-health.rsc index f02a2491..b0ff71df 100644 --- a/check-health.rsc +++ b/check-health.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/check-health.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/check-lte-firmware-upgrade.rsc b/check-lte-firmware-upgrade.rsc index c5b6cb56..71ff43e1 100644 --- a/check-lte-firmware-upgrade.rsc +++ b/check-lte-firmware-upgrade.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/check-lte-firmware-upgrade.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/check-perpetual-license.rsc b/check-perpetual-license.rsc index 9a3a3c74..202fd02f 100644 --- a/check-perpetual-license.rsc +++ b/check-perpetual-license.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/check-perpetual-license.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/check-routeros-update.rsc b/check-routeros-update.rsc index 361be34e..f3b7fbfc 100644 --- a/check-routeros-update.rsc +++ b/check-routeros-update.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/check-routeros-update.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/collect-wireless-mac.capsman.rsc b/collect-wireless-mac.capsman.rsc index 17e09e3c..3b5d1627 100644 --- a/collect-wireless-mac.capsman.rsc +++ b/collect-wireless-mac.capsman.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/collect-wireless-mac.local.rsc b/collect-wireless-mac.local.rsc index 4a38bfa4..2cc3662e 100644 --- a/collect-wireless-mac.local.rsc +++ b/collect-wireless-mac.local.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/collect-wireless-mac.template.rsc b/collect-wireless-mac.template.rsc index da901be2..c2f792d3 100644 --- a/collect-wireless-mac.template.rsc +++ b/collect-wireless-mac.template.rsc @@ -13,7 +13,8 @@ # !! Pattern '%TEMPL%' is replaced, paths are filtered. :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/collect-wireless-mac.wifi.rsc b/collect-wireless-mac.wifi.rsc index cb217ce1..2cae3272 100644 --- a/collect-wireless-mac.wifi.rsc +++ b/collect-wireless-mac.wifi.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/daily-psk.capsman.rsc b/daily-psk.capsman.rsc index 56729315..980da34e 100644 --- a/daily-psk.capsman.rsc +++ b/daily-psk.capsman.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/daily-psk.local.rsc b/daily-psk.local.rsc index 9dea4692..c4b2631c 100644 --- a/daily-psk.local.rsc +++ b/daily-psk.local.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/daily-psk.template.rsc b/daily-psk.template.rsc index 8202eeba..ef61d29b 100644 --- a/daily-psk.template.rsc +++ b/daily-psk.template.rsc @@ -13,7 +13,8 @@ # !! Pattern '%TEMPL%' is replaced, paths are filtered. :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/daily-psk.wifi.rsc b/daily-psk.wifi.rsc index 3de3c5b6..cf06c6a8 100644 --- a/daily-psk.wifi.rsc +++ b/daily-psk.wifi.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/dhcp-lease-comment.capsman.rsc b/dhcp-lease-comment.capsman.rsc index 36b31c85..2749c66c 100644 --- a/dhcp-lease-comment.capsman.rsc +++ b/dhcp-lease-comment.capsman.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/dhcp-lease-comment.local.rsc b/dhcp-lease-comment.local.rsc index 35dc6f68..04c589d2 100644 --- a/dhcp-lease-comment.local.rsc +++ b/dhcp-lease-comment.local.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/dhcp-lease-comment.template.rsc b/dhcp-lease-comment.template.rsc index 47a85542..1593291c 100644 --- a/dhcp-lease-comment.template.rsc +++ b/dhcp-lease-comment.template.rsc @@ -13,7 +13,8 @@ # !! Pattern '%TEMPL%' is replaced, paths are filtered. :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/dhcp-lease-comment.wifi.rsc b/dhcp-lease-comment.wifi.rsc index e0f97851..110c5e6d 100644 --- a/dhcp-lease-comment.wifi.rsc +++ b/dhcp-lease-comment.wifi.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/dhcp-to-dns.rsc b/dhcp-to-dns.rsc index 9b940984..1c4c2cfb 100644 --- a/dhcp-to-dns.rsc +++ b/dhcp-to-dns.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/dhcp-to-dns.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/firmware-upgrade-reboot.rsc b/firmware-upgrade-reboot.rsc index 86a9a8c5..17a6dd36 100644 --- a/firmware-upgrade-reboot.rsc +++ b/firmware-upgrade-reboot.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/firmware-upgrade-reboot.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/fw-addr-lists.rsc b/fw-addr-lists.rsc index f0940fef..e6171ac8 100644 --- a/fw-addr-lists.rsc +++ b/fw-addr-lists.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/fw-addr-lists.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/global-wait.rsc b/global-wait.rsc index ca3fc0c4..05948bdc 100644 --- a/global-wait.rsc +++ b/global-wait.rsc @@ -9,4 +9,5 @@ # https://rsc.eworm.de/doc/global-wait.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; diff --git a/gps-track.rsc b/gps-track.rsc index dea56d2e..0c961800 100644 --- a/gps-track.rsc +++ b/gps-track.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/gps-track.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/hotspot-to-wpa-cleanup.capsman.rsc b/hotspot-to-wpa-cleanup.capsman.rsc index 033d0e73..38c931db 100644 --- a/hotspot-to-wpa-cleanup.capsman.rsc +++ b/hotspot-to-wpa-cleanup.capsman.rsc @@ -13,7 +13,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/hotspot-to-wpa-cleanup.template.rsc b/hotspot-to-wpa-cleanup.template.rsc index 0f8c490e..21d1be2e 100644 --- a/hotspot-to-wpa-cleanup.template.rsc +++ b/hotspot-to-wpa-cleanup.template.rsc @@ -14,7 +14,8 @@ # !! Pattern '%TEMPL%' is replaced, paths are filtered. :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/hotspot-to-wpa-cleanup.wifi.rsc b/hotspot-to-wpa-cleanup.wifi.rsc index dfec697d..8c526d11 100644 --- a/hotspot-to-wpa-cleanup.wifi.rsc +++ b/hotspot-to-wpa-cleanup.wifi.rsc @@ -13,7 +13,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/hotspot-to-wpa.capsman.rsc b/hotspot-to-wpa.capsman.rsc index 3f514750..0340d502 100644 --- a/hotspot-to-wpa.capsman.rsc +++ b/hotspot-to-wpa.capsman.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/hotspot-to-wpa.template.rsc b/hotspot-to-wpa.template.rsc index 068241d1..88cab0ce 100644 --- a/hotspot-to-wpa.template.rsc +++ b/hotspot-to-wpa.template.rsc @@ -13,7 +13,8 @@ # !! Pattern '%TEMPL%' is replaced, paths are filtered. :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/hotspot-to-wpa.wifi.rsc b/hotspot-to-wpa.wifi.rsc index cc5e2fc6..d7d093ef 100644 --- a/hotspot-to-wpa.wifi.rsc +++ b/hotspot-to-wpa.wifi.rsc @@ -12,7 +12,8 @@ # !! Do not edit this file, it is generated from template! :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/ipsec-to-dns.rsc b/ipsec-to-dns.rsc index 26dab0a2..89c8f428 100644 --- a/ipsec-to-dns.rsc +++ b/ipsec-to-dns.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/ipsec-to-dns.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/ipv6-update.rsc b/ipv6-update.rsc index 94bd1bc4..32ce4b1d 100644 --- a/ipv6-update.rsc +++ b/ipv6-update.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/ipv6-update.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/lease-script.rsc b/lease-script.rsc index bf27fda8..1080f68f 100644 --- a/lease-script.rsc +++ b/lease-script.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/lease-script.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/log-forward.rsc b/log-forward.rsc index afeb3f29..ab0ce4fa 100644 --- a/log-forward.rsc +++ b/log-forward.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/log-forward.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/mode-button.rsc b/mode-button.rsc index edc5f400..411bc4d2 100644 --- a/mode-button.rsc +++ b/mode-button.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/mode-button.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc index 467d6362..aa36ff3a 100644 --- a/netwatch-dns.rsc +++ b/netwatch-dns.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/netwatch-dns.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/netwatch-notify.rsc b/netwatch-notify.rsc index 0b8a8dc5..2e01ff3e 100644 --- a/netwatch-notify.rsc +++ b/netwatch-notify.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/netwatch-notify.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/ospf-to-leds.rsc b/ospf-to-leds.rsc index a8662b32..262902a4 100644 --- a/ospf-to-leds.rsc +++ b/ospf-to-leds.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/ospf-to-leds.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/packages-update.rsc b/packages-update.rsc index b11596ea..3cd6da3d 100644 --- a/packages-update.rsc +++ b/packages-update.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/packages-update.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/ppp-on-up.rsc b/ppp-on-up.rsc index e09bd9d5..4b51156b 100644 --- a/ppp-on-up.rsc +++ b/ppp-on-up.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/ppp-on-up.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/sms-action.rsc b/sms-action.rsc index 3c8307a8..34bd93c3 100644 --- a/sms-action.rsc +++ b/sms-action.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/sms-action.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/sms-forward.rsc b/sms-forward.rsc index 8169022c..fcc2963c 100644 --- a/sms-forward.rsc +++ b/sms-forward.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/sms-forward.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/telegram-chat.rsc b/telegram-chat.rsc index 5db4860f..77242ce3 100644 --- a/telegram-chat.rsc +++ b/telegram-chat.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/telegram-chat.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/update-gre-address.rsc b/update-gre-address.rsc index cddfa92f..4071ca9c 100644 --- a/update-gre-address.rsc +++ b/update-gre-address.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/update-gre-address.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do { diff --git a/update-tunnelbroker.rsc b/update-tunnelbroker.rsc index 45afa6f8..049bdcef 100644 --- a/update-tunnelbroker.rsc +++ b/update-tunnelbroker.rsc @@ -12,7 +12,8 @@ # https://rsc.eworm.de/doc/update-tunnelbroker.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do {