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:
|
2023-04-12 20:49:50 +00:00
|
|
|
ln /usr/lib/PXELINUX/pxelinux.0 ${TFTP}/
|
|
|
|
ln /boot/ipxe.lkrn ${TFTP}/
|
|
|
|
ln /usr/lib/syslinux/memdisk ${TFTP}/
|
|
|
|
ln ${TFTP}/bios/ldlinux.c32 ${TFTP}/
|
2023-04-12 16:06:41 +00:00
|
|
|
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
|