summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader/updater.template.sh
diff options
context:
space:
mode:
authorSimon Rettberg2016-02-22 13:28:42 +0100
committerSimon Rettberg2016-02-22 13:28:42 +0100
commitd31a0ffc011136dd2e0fd477e2a1895d27c30679 (patch)
tree8077ddd9bb099048d8244198be5aa7817d92d72c /satellit_upgrader/updater.template.sh
parent[SSUS] Remove translation link in slxadmin (diff)
downloadsetup-scripts-d31a0ffc011136dd2e0fd477e2a1895d27c30679.tar.gz
setup-scripts-d31a0ffc011136dd2e0fd477e2a1895d27c30679.tar.xz
setup-scripts-d31a0ffc011136dd2e0fd477e2a1895d27c30679.zip
Add ipxe
Diffstat (limited to 'satellit_upgrader/updater.template.sh')
-rw-r--r--satellit_upgrader/updater.template.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 6a0dac8..b00dfc9 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -82,6 +82,7 @@ declare -rg TGZ_SLXADMIN="%TGZ_SLXADMIN%"
declare -rg TGZ_DOZMOD="%TGZ_DOZMOD%"
declare -rg TGZ_TASKMANAGER="%TGZ_TASKMANAGER%"
declare -rg TGZ_TFTP="%TGZ_TFTP%"
+declare -rg TGZ_IPXE="%TGZ_IPXE%"
declare -rg TGZ_LDADP="%TGZ_LDADP%"
declare -rg PAYLOAD_OFFSET="%PAYLOAD_OFFSET%"
@@ -90,6 +91,7 @@ declare -rg PATH_SLXADMIN="/srv/openslx/www/slx-admin"
declare -rg PATH_DOZMOD="/opt/dmsd"
declare -rg PATH_TASKMANAGER="/opt/taskmanager"
declare -rg PATH_TFTP="/srv/openslx/tftp"
+declare -rg PATH_IPXE="/opt/openslx/ipxe"
declare -rg PATH_LDADP="/opt/ldadp"
# ** Check if constants have been filled, bail out otherwise
@@ -121,6 +123,24 @@ declare -rg FILEDIR="$TMPDIR/files"
# **********************************************************
+# ************************** IPXE **************************
+if [ -n "$TGZ_IPXE" ]; then
+ [ -e "$TMPDIR/$TGZ_IPXE" ] || perror "$TGZ_IPXE missing from payload"
+ echo "* iPXE source code"
+ echo "Extracting"
+ 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
+ echo "Resetting pxe menu"
+ mysql -e 'UPDATE openslx.property SET value = "invalid" WHERE name = "server-ip"' || pwarning "Could not reset pxe menu status; manual regeneration of menu required"
+ echo "iPXE upgrade complete"
+ # Trigger default compile in the background so the next regen doesn't take too long
+ {
+ cd "$PATH_IPXE/src" && sudo -u taskmanager nice -n 10 make bin/undionly.kkkpxe > /dev/null 2>&1
+ } &
+fi
+
# ************************** SLX-Admin *********************
if [ -n "$TGZ_SLXADMIN" ]; then
[ -e "$TMPDIR/$TGZ_SLXADMIN" ] || perror "$TGZ_SLXADMIN missing from payload."
@@ -183,7 +203,7 @@ fi
if [ -n "$TGZ_TFTP" ]; then
[ -e "$TMPDIR/$TGZ_TFTP" ] || perror "$TGZ_TFTP missing from payload"
echo "* TFTP"
- echo "Extracting new jar and data"
+ echo "Extracting"
rm -rf -- "$PATH_TFTP"
mkdir -p "$PATH_TFTP"
tar -x -C "$PATH_TFTP" -f "$TMPDIR/$TGZ_TFTP" || perror "Could not extract $TGZ_TFTP to $PATH_TFTP"