From ecd195f5aa0082186be604c06e8409e3cdb50005 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 17 Jul 2023 10:01:59 +0200 Subject: [systemstatus] Show "reboot required" message on update-tab too --- modules-available/systemstatus/inc/systemstatus.inc.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules-available/systemstatus/inc') 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 -- cgit v1.2.3-55-g7522