summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannik Schönartz2020-08-13 16:42:23 +0200
committerJannik Schönartz2020-08-13 16:42:23 +0200
commit4235a2cfd6bb4c0f9f93186190b1f06aecbeb3c5 (patch)
treeff1aa30f4bbdbc9fcd85ac505c8528ea8fb837e2
parent[webapp] Load fonts locally instead of from the google server (diff)
downloadbas-4235a2cfd6bb4c0f9f93186190b1f06aecbeb3c5.tar.gz
bas-4235a2cfd6bb4c0f9f93186190b1f06aecbeb3c5.tar.xz
bas-4235a2cfd6bb4c0f9f93186190b1f06aecbeb3c5.zip
[server/embedded-script] Move the bas wallpaper to a later point in the process
-rw-r--r--server/ipxe/embedded.ipxe9
-rw-r--r--server/ipxe/registration.ipxe4
-rw-r--r--server/lib/confighelper.js6
3 files changed, 13 insertions, 6 deletions
diff --git a/server/ipxe/embedded.ipxe b/server/ipxe/embedded.ipxe
index d09689e..cdf1324 100644
--- a/server/ipxe/embedded.ipxe
+++ b/server/ipxe/embedded.ipxe
@@ -5,12 +5,9 @@
###################
ifopen
-dhcp
-
-# Wallpaper
-set img https://bas.intra.uni-freiburg.de/files/ipxe_wallpaper.png || goto loop
-console --picture ${img} --x 800 --y 600
+iseq ${platform} pcbios || dhcp ||
:loop
-chain https://bas.intra.uni-freiburg.de/api/configloader/${uuid}
+chain -ar https://bas.intra.uni-freiburg.de/api/configloader/${uuid} || sleep 5
+dhcp ||
goto loop \ No newline at end of file
diff --git a/server/ipxe/registration.ipxe b/server/ipxe/registration.ipxe
index 91e4c00..fdfbcfa 100644
--- a/server/ipxe/registration.ipxe
+++ b/server/ipxe/registration.ipxe
@@ -1,5 +1,9 @@
#!ipxe
+# Wallpaper
+set img https://bas.intra.uni-freiburg.de/files/ipxe_wallpaper.png || goto start
+console --picture ${img} --x 800 --y 600
+
:start
menu Initializing client registration
item --gap [Registration]
diff --git a/server/lib/confighelper.js b/server/lib/confighelper.js
index ed7cd14..3cbbe58 100644
--- a/server/lib/confighelper.js
+++ b/server/lib/confighelper.js
@@ -181,6 +181,8 @@ async function prepareConfig (configInfo, noScript) {
var script = ''
var menuscript = ''
script += '#!ipxe\r\n\r\n'
+ script += 'set img https://bas.intra.uni-freiburg.de/files/ipxe_wallpaper.png || goto start\r\n'
+ script += `console --picture \${img} --x 800 --y 600 ||\r\n\r\n`
script += ':start\r\n'
script += 'menu ' + config.name + '\r\n'
config.entries.forEach(entry => {
@@ -246,6 +248,8 @@ async function _createDynamicMenu (configInfos, noScript) {
var menuscript = ''
var defaultentry = ''
script += '#!ipxe\r\n\r\n'
+ script += 'set img https://bas.intra.uni-freiburg.de/files/ipxe_wallpaper.png || goto start\r\n'
+ script += `console --picture \${img} --x 800 --y 600 ||\r\n\r\n`
script += ':start\r\n'
script += 'menu ' + 'Choose one configuration to boot' + '\r\n'
configs.forEach(config => {
@@ -272,6 +276,8 @@ async function _createDynamicMenu (configInfos, noScript) {
// Creates a default overview config, when there is no default config in the frontend.
function getDefaultConfig (client) {
let script = '#!ipxe\r\n\r\n'
+ script += 'set img https://bas.intra.uni-freiburg.de/files/ipxe_wallpaper.png || goto start\r\n'
+ script += `console --picture \${img} --x 800 --y 600 ||\r\n\r\n`
script += ':start\r\n'
script += 'menu ' + 'Client is successfully registered' + '\r\n'
script += 'item --gap BAS-ID: ' + client.id + '\r\n'