pxe-bootserver/old-version/configure-debian-system.sh

35 lines
953 B
Bash
Raw Normal View History

2023-04-12 16:06:41 +00:00
#!/bin/sh
2023-04-13 10:08:48 +00:00
# Load Global Settings
. ./settings.sh
2023-04-12 16:06:41 +00:00
# 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
2023-04-13 12:28:53 +00:00
if ! [ -e ${TFTP}/pxelinux.cfg/default ]; then
cp ./resources/default-minimal ${TFTP}/pxelinux.cfg/default
fi
2023-04-12 16:06:41 +00:00
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
2023-04-13 21:24:44 +00:00
chown ${USERID}:${GROUPID} . -R
chmod a+rw . -R
2023-04-13 13:25:21 +00:00
2023-04-13 21:24:44 +00:00
chown ${USERID}:${GROUPID} ${TFTP} -R
2023-04-12 16:06:41 +00:00
chmod a+rwx ${TFTP} -R
# restart services
systemctl restart tftpd-hpa lighttpd nfs-kernel-server