diff options
author | Simon Rettberg | 2023-07-17 10:01:59 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-07-17 10:01:59 +0200 |
commit | ecd195f5aa0082186be604c06e8409e3cdb50005 (patch) | |
tree | c2f1c20deb0888e89b34490add1e2b59781b84e2 /modules-available/systemstatus/inc | |
parent | [minilinux] Make title db columns longer (diff) | |
download | slx-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/inc')
-rw-r--r-- | modules-available/systemstatus/inc/systemstatus.inc.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules-available/systemstatus/inc/systemstatus.inc.php b/modules-available/systemstatus/inc/systemstatus.inc.php index 85f0410b..ff8543c1 100644 --- a/modules-available/systemstatus/inc/systemstatus.inc.php +++ b/modules-available/systemstatus/inc/systemstatus.inc.php @@ -95,4 +95,17 @@ class SystemStatus return (int)filemtime(file_exists('/var/log/dpkg.log') ? '/var/log/dpkg.log' : '/var/lib/dpkg/status'); } + /** + * Get list of packages that have been updated, but require a reboot of the system + * to fully take effect. + * @return string[] + */ + public static function getPackagesRequiringReboot(): array + { + if (!file_exists('/run/reboot-required.pkgs')) + return []; + $lines = file('/run/reboot-required.pkgs', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + return array_unique($lines); + } + }
\ No newline at end of file |