diff --git a/conf.d/service_10_main.conf.sh b/conf.d/service_10_main.conf.sh index 9ff940a..1e7c783 100755 --- a/conf.d/service_10_main.conf.sh +++ b/conf.d/service_10_main.conf.sh @@ -15,9 +15,31 @@ fservice $S_ENABLED $1 $S_NAME "$S_PACKAGES" case $1 in -init) + init) + # create directories + mkdir -p ${D_TFTP} + mkdir -p ${D_TFTP}/pxelinux.cfg -;; + # copy Files some files: + cp -a /usr/lib/syslinux/modules/bios ${D_TFTP}/ + + # Link needed Files from installed Debian Packages to the TFTP-Root: + ln /usr/lib/PXELINUX/pxelinux.0 ${D_TFTP}/ + ln /boot/ipxe.lkrn ${D_TFTP}/ipxe + ln /usr/lib/syslinux/memdisk ${D_TFTP}/ + ln ${D_TFTP}/bios/ldlinux.c32 ${D_TFTP}/ + ln ${D_TFTP}/pxelinux.cfg/default ${D_TFTP}/default -s + + # download needed files: + wget -O ${D_TFTP}/wimboot "https://github.com/ipxe/wimboot/releases/latest/download/wimboot" + + # set file access + chown ${USERID}:${GROUPID} . -R + chmod a+rw . -R + + chown ${USERID}:${GROUPID} ${D_TFTP} -R + chmod a+rwx ${D_TFTP} -R + ;; esac