summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Rößler2018-05-07 14:54:49 +0200
committerChristian Rößler2018-05-07 14:54:49 +0200
commit54ba99d4dd7b6ebb91cfe50b1862971eb9985597 (patch)
treedc2b65baf1634441dd03e8a7fc41563eb1cc259b
parent[SSUS] Purge atftpd instead of just uninstalling (diff)
downloadsetup-scripts-54ba99d4dd7b6ebb91cfe50b1862971eb9985597.tar.gz
setup-scripts-54ba99d4dd7b6ebb91cfe50b1862971eb9985597.tar.xz
setup-scripts-54ba99d4dd7b6ebb91cfe50b1862971eb9985597.zip
[SSPS] iPXE compilation in background added
-rw-r--r--satellit_installer/includes/10-install_ipxe.inc17
-rwxr-xr-xsatellit_installer/satellit_installer5
2 files changed, 21 insertions, 1 deletions
diff --git a/satellit_installer/includes/10-install_ipxe.inc b/satellit_installer/includes/10-install_ipxe.inc
index cbbd509..ec3878d 100644
--- a/satellit_installer/includes/10-install_ipxe.inc
+++ b/satellit_installer/includes/10-install_ipxe.inc
@@ -1,15 +1,30 @@
install_ipxe() {
[ -z "$1" ] && perror "Call install_ipxe with target directory!"
+ local OLDPWD=$(pwd)
# chr 20160602: Kein --depth wg. commit-ID fuer Patch
# git clone --depth 1 git://git.ipxe.org/ipxe.git "$1" || perror "Cloning ipxe repo failed"
git clone git://git.ipxe.org/ipxe.git "$1" || perror "Cloning ipxe repo failed"
cd "$1"
git reset --hard 936657832f2262ad04bdf16b9229ce0b1d1c174f
git apply --ignore-whitespace < "${BASEDIR}/static_files/ipxe.patch" || perror "Could not patch ipxe compile-time configuration"
- cd - > /dev/null
+ cd src
+
+ cd "${OLDPWD}" > /dev/null
wget -O "$1/pxelinux.0" "$HTTP_BASE/pxelinux.0" || perror "Could not download pxelinux 4 from $HTTP_BASE"
# Symlink for USB-Stick HTTP access
mkdir -p "$WWWDIR"
ln -s -f "$TFTPDIR" "$WWWDIR/tftp" || perror "Could not create symlink for tftp dir"
}
+
+compile_ipxe() {
+ echo "*** compiling iPXE in the background ..."
+ [ -z "$1" ] && perror "Call compile_ipxe with target directory!"
+ cd cd "$1"/src
+ make bin/undionly.kkkpxe
+ if [ "$ERR" -ne 0 ]; then
+ pwarning "*** Background compilation of iPXE failed."
+ else
+ echo "*** Background compilation of iPXE successful."
+ fi
+}
diff --git a/satellit_installer/satellit_installer b/satellit_installer/satellit_installer
index 85d5114..93f9c69 100755
--- a/satellit_installer/satellit_installer
+++ b/satellit_installer/satellit_installer
@@ -141,6 +141,7 @@ install_dnbd3-server "$DNBD3DIR"
install_taskmanager "$TASKMANDIR"
install_ipxe "$IPXEDIR"
+compile_ipxe &> /tmp/ipxesuccess &
# $1: tar.gz-file, $2: unpacking to directory
unpack_tar_gz "$BASEDIR/static_files/slx-admin.tar.gz" "-C $WWWDIR/slx-admin"
@@ -208,4 +209,8 @@ finalize # Cleaning script; finalize script will delete itself.
[ "$NODELETE_SOURCE" != "true" ] && { echo "#"; echo "# Deleting source directory..."; rm -rf "$BASEDIR"; echo "# done."; } \
|| { echo "#"; echo "# Not deleting source directory; nodelete option was given."; }
+echo "Warte auf eventuelle Hintergrundprozesse."
+wait
+cat /tmp/ipxesuccess && rm /tmp/ipxesuccess
+
exit 0