From 64c2b965602a7b8dab40cf2a9815d996a10cdfe4 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 29 Oct 2019 14:56:36 +0100 Subject: [SSPS] Patch ipxe config to meet our requirements --- satellit_installer/includes/10-install_ipxe.inc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 +} -- cgit v1.2.3-55-g7522