Files
tftpd/entrypoint.sh
Wang Defa faaa117594
All checks were successful
Build and Push TFTP Docker Image / docker-build-push (push) Successful in 29s
首次提交
2025-12-03 11:32:26 +08:00

25 lines
749 B
Bash

#!/bin/sh
TFTPBOOT_DIR="/var/lib/tftpboot"
if [ "$DOWNLOAD_NETBOOT_XYZ" = "true" ]; then
echo "DOWNLOAD_NETBOOT_XYZ is true. Downloading netboot.xyz files..."
mkdir -p "$TFTPBOOT_DIR"
curl -o "$TFTPBOOT_DIR/netboot.xyz-arm64.efi" https://boot.netboot.xyz/ipxe/netboot.xyz-arm64.efi
if [ $? -ne 0 ]; then
echo "Error downloading netboot.xyz-arm64.efi"
fi
curl -o "$TFTPBOOT_DIR/netboot.xyz.efi" https://boot.netboot.xyz/ipxe/netboot.xyz.efi
if [ $? -ne 0 ]; then
echo "Error downloading netboot.xyz.efi"
fi
echo "Download complete."
else
echo "DOWNLOAD_NETBOOT_XYZ is not true or not set. Skipping netboot.xyz file download."
fi
exec /usr/sbin/in.tftpd -L -vvv -u ftp --secure --address "0.0.0.0:69" "$TFTPBOOT_DIR"