From f5465d3e34a3cf668eff8a061b109743993c1dbf Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 6 Apr 2022 17:40:21 +0200 Subject: capsman-download-packages: try to warn about missing logs (cherry picked from commit 9dbc56457b1fb25099f7d487b8284a03b47ffbe4) --- capsman-download-packages | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/capsman-download-packages b/capsman-download-packages index 64b6304..fc7ecc7 100644 --- a/capsman-download-packages +++ b/capsman-download-packages @@ -53,9 +53,15 @@ $WaitFullyConnected; } } -:if ($Updated = false && [ / system resource get uptime ] < 2m) do={ - $LogPrintExit2 info $0 ("No packages downloaded, yet. Delaying for logs.") false; - :delay 2m; +:if ([ :len [ / system logging find where topics~"error" !(topics~"!error") \ + !(topics~"!caps") action=memory !disabled !invalid ] ] < 1) do={ + $LogPrintExit2 warning $0 ("Looks like error messages for 'caps' are not sent to memory. " . \ + "Probably can not download packages automatically.") false; +} else={ + :if ($Updated = false && [ / system resource get uptime ] < 2m) do={ + $LogPrintExit2 info $0 ("No packages downloaded, yet. Delaying for logs.") false; + :delay 2m; + } } :foreach Log in=[ / log find where topics=({"caps", "error"}) \ -- cgit v1.2.3-70-g09d2