pxe-bootserver/configure-debian-system.sh

28 lines
778 B
Bash
Raw Normal View History

2023-04-12 16:06:41 +00:00
#!/bin/sh
TFTP=/srv/tftp
# create directories
mkdir -p ${TFTP}
mkdir -p ${TFTP}/pxelinux.cfg
# copy Files from the Resource-Dir to the correct places:
cp ./resources/lighttpd.conf /etc/lighttpd/lighttpd.conf
cp ./resources/exports /etc/exports
cp ./resources/default-minimal ${TFTP}/pxelinux.cfg/default
cp ./resources/splash.png ${TFTP}/
cp -a /usr/lib/syslinux/modules/bios ${TFTP}/
# Link needed Files from installed Debian Packages to the TFTP-Root:
ln /usr/lib/PXELINUX/pxelinux.0 $TFTP/
ln /boot/ipxe.lkrn $TFTP/
ln ${TFTP}/bios/ldlinux.c32 $TFTP/
ln ${TFTP}/pxelinux.cfg/default ${TFTP}/default -s
# set file access
chown www-data.www-data ${TFTP} -R
chmod a+rwx ${TFTP} -R
# restart services
systemctl restart tftpd-hpa lighttpd nfs-kernel-server