summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol
diff options
context:
space:
mode:
authorSimon Rettberg2022-05-02 17:07:27 +0200
committerSimon Rettberg2022-05-02 17:07:27 +0200
commit4850e5a3b5ab8fb0a652779128e7097261abbdb5 (patch)
treed6added455ae0efe02279624c2c2e9015a7affa9 /modules-available/rebootcontrol
parent[serversetup-bwlp-ipxe] Fix pvsmgr hack (accessed wrong field) (diff)
downloadslx-admin-4850e5a3b5ab8fb0a652779128e7097261abbdb5.tar.gz
slx-admin-4850e5a3b5ab8fb0a652779128e7097261abbdb5.tar.xz
slx-admin-4850e5a3b5ab8fb0a652779128e7097261abbdb5.zip
[rebootcontrol] Show location for automated WOL test tasks
Diffstat (limited to 'modules-available/rebootcontrol')
-rw-r--r--modules-available/rebootcontrol/hooks/cron.inc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules-available/rebootcontrol/hooks/cron.inc.php b/modules-available/rebootcontrol/hooks/cron.inc.php
index 73de020d..c10e8626 100644
--- a/modules-available/rebootcontrol/hooks/cron.inc.php
+++ b/modules-available/rebootcontrol/hooks/cron.inc.php
@@ -155,7 +155,7 @@ Database::exec('DELETE FROM reboot_subnet WHERE fixed = 0 AND lastseen < :cutoff
// Get machines running, group by subnet
$cutoff = time() - 301; // Really only the ones that didn't miss the most recent update
-$res = Database::simpleQuery("SELECT s.subnetid, s.end AS bcast, m.machineuuid, m.clientip, m.macaddr
+$res = Database::simpleQuery("SELECT s.subnetid, s.end AS bcast, m.machineuuid, m.clientip, m.macaddr, m.locationid
FROM reboot_subnet s
INNER JOIN machine m ON (
(m.state = 'IDLE' OR m.state = 'OCCUPIED')
@@ -177,6 +177,7 @@ foreach ($res as $row) {
}
Stuff::$subnets[$row['subnetid']][] = $row;
}
+unset($res);
$task = Taskmanager::submit('DummyTask', []);
$task = Taskmanager::waitComplete($task, 4000);