summaryrefslogtreecommitdiffstats
path: root/server/lib/shell.js
diff options
context:
space:
mode:
authorJannik Schönartz2018-08-28 19:35:51 +0200
committerJannik Schönartz2018-08-28 19:35:51 +0200
commit17759278184463f84e2dfdbaa93882d0d3dd5423 (patch)
treeb79822af67ac41edeea1e9e7cea0c8dc8353cfbd /server/lib/shell.js
parent[configloader] made the code actually work (diff)
downloadbas-17759278184463f84e2dfdbaa93882d0d3dd5423.tar.gz
bas-17759278184463f84e2dfdbaa93882d0d3dd5423.tar.xz
bas-17759278184463f84e2dfdbaa93882d0d3dd5423.zip
[registration/dhcp] Implement dhcp as external-backend
Registration -> Registrations to match API guidelines. Fixed shell script to only build undionly.kpxe. Added infoblock external-backend. Removed dhcp from config.json Fixed ipxe scripts to match the registrations.
Diffstat (limited to 'server/lib/shell.js')
-rw-r--r--server/lib/shell.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/lib/shell.js b/server/lib/shell.js
index e0782f1..37de779 100644
--- a/server/lib/shell.js
+++ b/server/lib/shell.js
@@ -20,13 +20,15 @@ module.exports = {
shell.rm(path.join(__appdir, 'ipxe', 'ipxe', 'src', 'config', 'console.h'))
shell.cp(path.join(__appdir, 'ipxe', 'console.h'), path.join(__appdir, 'ipxe', 'ipxe', 'src', 'config'))
// var make = 'make EMBED=' + path.join(__appdir, 'ipxe', 'main.ipxe');
- var make = 'make EMBED=' + path.join(__appdir, 'ipxe', 'main.ipxe') + ' TRUST=' + path.join(__appdir, 'bin', 'fullchain.pem')
+ var make = 'make EMBED=' + path.join(__appdir, 'ipxe', 'main.ipxe') + ' TRUST=' + path.join(__appdir, 'bin', 'fullchain.pem') + ' bin/undionly.kpxe'
// shell.env.PATH = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin';
shell.env.DEBUG = ''
shell.exec(make, function (code, stdout, stderr) {
- shell.rm(path.join(__appdir, 'tftp', 'ipxe.0'))
- shell.cp('bin/ipxe.pxe', path.join(__appdir, 'tftp'))
- shell.mv(path.join(__appdir, 'tftp', 'ipxe.pxe'), path.join(__appdir, 'tftp', 'ipxe.0'))
+ // shell.rm(path.join(__appdir, 'tftp', 'ipxe.0'))
+ shell.rm(path.join(__appdir, 'ipxe', 'ipxe.0'))
+ // shell.cp('bin/undionly.kpxe', path.join(__appdir, 'tftp'))
+ shell.cp('bin/undionly.kpxe', path.join(__appdir, 'ipxe'))
+ shell.mv(path.join(__appdir, 'ipxe', 'undionly.kpxe'), path.join(__appdir, 'ipxe', 'ipxe.0'))
// shell.rm('-rf', 'ipxe');
return res.status(200).send({ status: 'success' })
})