summaryrefslogtreecommitdiffstats
path: root/modules-available/systemstatus/hooks/main-warning.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-06-06 19:07:14 +0200
committerSimon Rettberg2017-06-06 19:07:14 +0200
commitdd058b606d935c5d4dd6b2d6cd44ec2088868b37 (patch)
treebd04010196064f19c32d2e0d9d672a4c65f09715 /modules-available/systemstatus/hooks/main-warning.inc.php
parent[translation] Fix warning (diff)
downloadslx-admin-dd058b606d935c5d4dd6b2d6cd44ec2088868b37.tar.gz
slx-admin-dd058b606d935c5d4dd6b2d6cd44ec2088868b37.tar.xz
slx-admin-dd058b606d935c5d4dd6b2d6cd44ec2088868b37.zip
[systemstatus] Show updated packages requiring reboot
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, 7 insertions, 0 deletions
diff --git a/modules-available/systemstatus/hooks/main-warning.inc.php b/modules-available/systemstatus/hooks/main-warning.inc.php
new file mode 100644
index 00000000..406ae73c
--- /dev/null
+++ b/modules-available/systemstatus/hooks/main-warning.inc.php
@@ -0,0 +1,7 @@
+<?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));
+} \ No newline at end of file