diff options
author | Christian Hesse <mail@eworm.de> | 2022-04-06 17:40:21 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-04-07 09:27:38 +0200 |
commit | f5465d3e34a3cf668eff8a061b109743993c1dbf (patch) | |
tree | c8fcaf6da199294453852dd73aa1d2c3aee36be8 | |
parent | 2c2a3013f3d6170867a7416ad6533e4d31fc3dbe (diff) |
capsman-download-packages: try to warn about missing logs
(cherry picked from commit 9dbc56457b1fb25099f7d487b8284a03b47ffbe4)
-rw-r--r-- | capsman-download-packages | 12 |
1 files 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"}) \ |