From d073432983c63a7df7c5afbbd0c948a3ad2c7529 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 21 Mar 2016 18:16:23 +0100 Subject: [ipxe] Add error to eventlog if compile process failed --- inc/event.inc.php | 3 +++ inc/taskmanagercallback.inc.php | 7 +++++++ 2 files changed, 10 insertions(+) (limited to 'inc') diff --git a/inc/event.inc.php b/inc/event.inc.php index 3e9f93aa..e014666a 100644 --- a/inc/event.inc.php +++ b/inc/event.inc.php @@ -75,6 +75,9 @@ class Event { global $tidIpxe; $tidIpxe = Trigger::ipxe(); + if (is_string($tidIpxe)) { + TaskmanagerCallback::addCallback($tidIpxe, 'cbIpxeBuilt'); + } ConfigModule::serverIpChanged(); } diff --git a/inc/taskmanagercallback.inc.php b/inc/taskmanagercallback.inc.php index cec763fb..efa5aacd 100644 --- a/inc/taskmanagercallback.inc.php +++ b/inc/taskmanagercallback.inc.php @@ -116,6 +116,13 @@ class TaskmanagerCallback EventLog::warning("Could not generate Active Directory configuration", $task['data']['error']); } + public static function cbIpxeBuilt($task) + { + if (Taskmanager::isFailed($task)) { + EventLog::warning("Could not recompile iPXE menu.", $task['data']['error']); + } + } + /** * Generating a config module has finished. * -- cgit v1.2.3-55-g7522