首次提交
All checks were successful
Build and Push TFTP Docker Image / docker-build-push (push) Successful in 29s
All checks were successful
Build and Push TFTP Docker Image / docker-build-push (push) Successful in 29s
This commit is contained in:
25
entrypoint.sh
Normal file
25
entrypoint.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user