summaryrefslogblamecommitdiffstats
path: root/satellit_installer/includes/10-install_ipxe.inc
blob: e6a451c820ede20bc6342449d7666f67b1beef4b (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                                        
                                                                                                                        
                                                                                               


                                                                                            
 


                                                       
            
                                                                        
                   
                                
                                          




                                                                     
            
 

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"
	cp "$BASEDIR/static_files/pxelinux.0" "$1/" || perror "Could not copy pxelinux.0 to $1"
	# 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 ..."
	echo
	[ -z "$1" ] && perror "Call compile_ipxe with target directory!"
	cd "$1/src"
	make bin/undionly.kkkpxe
	chown -R taskmanager:www-data "$1"
	if [ "$ERR" -ne 0 ]; then
		pwarning "*** Background compilation of iPXE failed."
	else
		echo "*** Background compilation of iPXE successful."
	fi
	echo
}