summaryrefslogtreecommitdiffstats
path: root/modules-available/systemstatus/hooks/main-warning.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2023-07-17 10:01:59 +0200
committerSimon Rettberg2023-07-17 10:01:59 +0200
commitecd195f5aa0082186be604c06e8409e3cdb50005 (patch)
treec2f1c20deb0888e89b34490add1e2b59781b84e2 /modules-available/systemstatus/hooks/main-warning.inc.php
parent[minilinux] Make title db columns longer (diff)
downloadslx-admin-ecd195f5aa0082186be604c06e8409e3cdb50005.tar.gz
slx-admin-ecd195f5aa0082186be604c06e8409e3cdb50005.tar.xz
slx-admin-ecd195f5aa0082186be604c06e8409e3cdb50005.zip
[systemstatus] Show "reboot required" message on update-tab too
Diffstat (limited to 'modules-available/systemstatus/hooks/main-warning.inc.php')
-rw-r--r--modules-available/systemstatus/hooks/main-warning.inc.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules-available/systemstatus/hooks/main-warning.inc.php b/modules-available/systemstatus/hooks/main-warning.inc.php
index 02b017e8..facf5d83 100644
--- a/modules-available/systemstatus/hooks/main-warning.inc.php
+++ b/modules-available/systemstatus/hooks/main-warning.inc.php
@@ -1,9 +1,8 @@
<?php
-if (file_exists('/run/reboot-required.pkgs')) {
- $lines = file('/run/reboot-required.pkgs', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
- $lines = array_unique($lines);
- Message::addInfo('systemstatus.update-reboot-required', true, implode(', ', $lines));
+$pkgs = SystemStatus::getPackagesRequiringReboot();
+if (!empty($pkgs)) {
+ Message::addInfo('systemstatus.update-reboot-required', true, implode(', ', $pkgs));
}
$aptTs = SystemStatus::getAptLastDbUpdateTime();