diff options
author | Simon Rettberg | 2019-10-29 14:56:36 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-10-29 14:56:36 +0100 |
commit | 64c2b965602a7b8dab40cf2a9815d996a10cdfe4 (patch) | |
tree | 4d87c2027312c4d17944a4fb9c555867b1b63885 /satellit_installer | |
parent | [SSPS] Restore legacy pxelinux support (diff) | |
download | setup-scripts-64c2b965602a7b8dab40cf2a9815d996a10cdfe4.tar.gz setup-scripts-64c2b965602a7b8dab40cf2a9815d996a10cdfe4.tar.xz setup-scripts-64c2b965602a7b8dab40cf2a9815d996a10cdfe4.zip |
[SSPS] Patch ipxe config to meet our requirements
Diffstat (limited to 'satellit_installer')
-rw-r--r-- | satellit_installer/includes/10-install_ipxe.inc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/satellit_installer/includes/10-install_ipxe.inc b/satellit_installer/includes/10-install_ipxe.inc index e6a451c..5e22a24 100644 --- a/satellit_installer/includes/10-install_ipxe.inc +++ b/satellit_installer/includes/10-install_ipxe.inc @@ -6,6 +6,10 @@ install_ipxe() { # Symlink for USB-Stick HTTP access mkdir -p "$WWWDIR" ln -s -f "$TFTPDIR" "$WWWDIR/tftp" || perror "Could not create symlink for tftp dir" + # Patch config + local PATH_IPXE="$1" + ipxe_enable CONSOLE_FRAMEBUFFER CONSOLE_CMD MENU_CMD PARAM_CMD DOWNLOAD_PROTO_HTTPS IMAGE_PNG NVO_CMD IFMGMT_CMD LOGIN_CMD SHELL_CMD MENU_CMD REBOOT_CMD POWEROFF_CMD + ipxe_disable NET_PROTO_STP NET_PROTO_LACP CRYPTO_80211_WEP CRYPTO_80211_WPA CRYPTO_80211_WPA2 IWMGMT_CMD IBMGMT_CMD FCMGMT_CMD CONSOLE_SERIAL } compile_ipxe() { @@ -22,3 +26,20 @@ compile_ipxe() { fi echo } + +ipxe_enable () { + local var + while [ $# -gt 0 ]; do + var="$1" + sed -i -r "s~^\\s*(//\\s*#define|#undef)\\s+${var}(\\s|$)~#define ${var} /* enabled by bwLehrpool */\\2~" "$PATH_IPXE"/src/config/*.h || pwarning "Could not enable iPXE option $var" + shift + done +} +ipxe_disable () { + local var + while [ $# -gt 0 ]; do + var="$1" + sed -i -r "s~^\\s*(//\\s*#undef|#define)\\s+${var}(\\s|\$)~#undef ${var} /* disabled by bwLehrpool */\\2~" "$PATH_IPXE"/src/config/*.h || pwarning "Could not disable iPXE option $var" + shift + done +} |