diff options
author | Simon Rettberg | 2019-03-25 17:38:51 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-03-25 17:38:51 +0100 |
commit | f3e82ee1e4862397332d3172641881fc8a62cd7f (patch) | |
tree | 8063929cb36c5a3b2c0b0f58d2b2fe7d8b8e4e36 /modules-available/serversetup-bwlp-ipxe/hooks | |
parent | [statistics] clientlist: Add (de)select all button (diff) | |
download | slx-admin-f3e82ee1e4862397332d3172641881fc8a62cd7f.tar.gz slx-admin-f3e82ee1e4862397332d3172641881fc8a62cd7f.tar.xz slx-admin-f3e82ee1e4862397332d3172641881fc8a62cd7f.zip |
[serversetup-bwlp-ipxe] Don't compile iPXE if serverip is invalid
Diffstat (limited to 'modules-available/serversetup-bwlp-ipxe/hooks')
-rw-r--r-- | modules-available/serversetup-bwlp-ipxe/hooks/ipxe-update.inc.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/hooks/ipxe-update.inc.php b/modules-available/serversetup-bwlp-ipxe/hooks/ipxe-update.inc.php index 583c5a2b..c58a64ae 100644 --- a/modules-available/serversetup-bwlp-ipxe/hooks/ipxe-update.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/hooks/ipxe-update.inc.php @@ -3,8 +3,10 @@ $data = [ 'ipaddress' => Property::getServerIp() ]; +if ($data['ipaddress'] === 'invalid') + return false; $task = Taskmanager::submit('CompileIPxeNew', $data); -if (!isset($task['id'])) +if (Taskmanager::isFailed($task)) return false; Property::set('ipxe-task-id', $task['id'], 15); return $task['id'];
\ No newline at end of file |