From 9dbc56457b1fb25099f7d487b8284a03b47ffbe4 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 --- capsman-download-packages | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'capsman-download-packages') diff --git a/capsman-download-packages b/capsman-download-packages index ac5ec0e..da43454 100644 --- a/capsman-download-packages +++ b/capsman-download-packages @@ -50,9 +50,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