diff options
author | Simon Rettberg | 2021-04-20 14:00:35 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-04-20 14:11:29 +0200 |
commit | 716a829e1404ab0fbb450909bf06b99ac6221ff5 (patch) | |
tree | 76ab82e51551b8d97cf986f6683efcee356e65fd /satellit_upgrader | |
parent | [SSPS] Remove unused functions (diff) | |
download | setup-scripts-716a829e1404ab0fbb450909bf06b99ac6221ff5.tar.gz setup-scripts-716a829e1404ab0fbb450909bf06b99ac6221ff5.tar.xz setup-scripts-716a829e1404ab0fbb450909bf06b99ac6221ff5.zip |
[SSUS] Install bwlp config for iPXE
Diffstat (limited to 'satellit_upgrader')
-rw-r--r-- | satellit_upgrader/updater.template.sh | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh index 37ccb35..2ebb906 100644 --- a/satellit_upgrader/updater.template.sh +++ b/satellit_upgrader/updater.template.sh @@ -393,38 +393,31 @@ elif [ -n "$TGZ_IPXE" ]; then rm -rf -- "$PATH_IPXE" mkdir -p "$PATH_IPXE" tar -x -C "$PATH_IPXE" -f "$TMPDIR/$TGZ_IPXE" || perror "Could not extract $TGZ_IPXE to $PATH_IPXE" - fixperms "$PATH_IPXE" taskmanager:taskmanager # Trigger default compile in the background so the next regen doesn't take too long build=true fi if $build; then # Bring up to date either way - cd "$PATH_IPXE" - # Reset modified config, in case the files have changed upstream; will be re-applied below - failprint sudo -n -u taskmanager git checkout src/config - failprint sudo -n -u taskmanager git pull --all || pwarning "Could not update iPXE -- let's hope the old version still works." + cd "$PATH_IPXE" || perror "ipxe directory not found ($PATH_IPXE)" + fixperms "$PATH_IPXE" taskmanager:taskmanager + # Reset modified config, older versions changed these + echo "Running git..." + sudo -n -u taskmanager git reset &> /dev/null + sudo -n -u taskmanager git checkout src/config &> /dev/null + sudo -n -u taskmanager git checkout openslx + sudo -n -u taskmanager git pull --all &> /dev/null \ + || ( + sudo -n -u taskmanager git reset --hard origin/openslx + failprint sudo -n -u taskmanager git pull --all + ) \ + || pwarning "Could not update iPXE -- let's hope the old version still works." + echo "Adding bwlp config..." + install_files "ipxe-bwlp" + fixperms "$PATH_IPXE" taskmanager:taskmanager echo "Resetting pxe menu" - 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 - } - 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 VRAM_SETTINGS - 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 mysql -e 'UPDATE openslx.property SET value = "invalid" WHERE name = "server-ip"' || pwarning "Could not reset pxe menu status; manual regeneration of menu required" { - cd "$PATH_IPXE/src" && sudo -n -u taskmanager nice -n 10 make -j2 bin/undionly.kkkpxe > /dev/null 2>&1 + cd "$PATH_IPXE/src" && sudo -n -u taskmanager nice -n 10 make -j2 CONFIG=bwlp bin/undionly.kkkpxe > /dev/null 2>&1 } & IPXE_PID=$! fi |