summaryrefslogtreecommitdiffstats
path: root/modules-available/systemstatus/inc/systemstatus.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/systemstatus/inc/systemstatus.inc.php')
-rw-r--r--modules-available/systemstatus/inc/systemstatus.inc.php13
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