summaryrefslogtreecommitdiffstats
path: root/satellit_installer/includes/10-install_ipxe.inc
blob: ec9ffea75bab3ad443ad6e98d699daa198083e2f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

install_ipxe() {
	[ -z "$1" ] && perror "Call install_ipxe with target directory!"
	git clone --branch openslx https://git.openslx.org/openslx-ng/ipxe.git "$1" || perror "Cloning ipxe repo failed"
	# Symlink for USB-Stick HTTP access
	mkdir -p "$WWWDIR"
	ln -s -f "$TFTPDIR" "$WWWDIR/tftp" || perror "Could not create symlink for tftp dir"
	# Add bwlp config
	install_files "ipxe-bwlp"
	mkdir -p "/opt/openslx/ipxe/src/config/local/bwlp"
	cp /opt/openslx/ipxe-bwlp-config/*.h "/opt/openslx/ipxe/src/config/local/bwlp/"
	chown -R taskmanager:taskmanager "$1"
}

compile_ipxe() {
	echo "*** compiling iPXE in the background ..."
	echo
	[ -z "$1" ] && perror "Call compile_ipxe with target directory!"
	cd "$1/src"
	sudo -u taskmanager -n make bin/undionly.kkkpxe
	chown -R taskmanager:taskmanager "$1"
	if [ "$ERR" -ne 0 ]; then
		pwarning "*** Background compilation of iPXE failed."
	else
		echo "*** Background compilation of iPXE successful."
	fi
	echo
}