summaryrefslogblamecommitdiffstats
path: root/server/api/ipxe-loader.js
blob: 57c152fad6b994998f7f390b10145849dbd68203 (plain) (tree)









































                                                            
module.exports = {
    loadScript: function(req, res) {
            res.setHeader('content-type', 'text/plain');
            res.status(200).send(`#!ipxe
dhcp

:start
menu Please choose a webserver to load the ipxe menu:
item pxelnx PxeLinux
item exit Exit
item exit0 Exit0
item exit1 Exit1
item sh [Shell]
choose target && goto \${target}

:exit
exit
:exit0
exit 0
:exit1
exit 1
:pxelnx
# set 210:string https://bas.stfu-kthx.net:8888/
# chain \${210:string}pxelinux.0 || goto start
#chain https://bas.stfu-kthx.net:8888/pxelinux.0
# set next-server bas-stfu-kthx.net:8888
# set 209:string https://bas.stfu-kthx.net:8888/pxelinux.cfg
#imgload pxelinux.0
#boot pxelinux.0

set 209:string pxelinux.cfg/default
set 210:string bas.stfu-kthx.net
# chain tftp://bas.stfu-kthx.net/pxelinux.0 || goto start
kernel tftp://bas.stfu-kthx.net/ldlinux.c32
imgload tftp://bas.stfu-kthx.net/pxelinux.0
boot

:sh
shell
goto start`);
    }
}