Merge "Add tftp support for Fedora"

This commit is contained in:
Jenkins 2013-10-28 19:09:38 +00:00 committed by Gerrit Code Review
commit 69b9369a4b
1 changed files with 9 additions and 3 deletions

View File

@ -2,7 +2,7 @@
set -eux
# syslinux is installed by nova-compute, which contains pxelinux.0
install-packages atftpd xinetd
install-packages tftpd-hpa xinetd
mkdir -p /tftpboot/pxelinux.cfg/
if [ -f /usr/lib/syslinux/pxelinux.0 ]; then
@ -14,6 +14,9 @@ else
exit 1
fi
# Disable the tftp-hpa upstart job, we're using xinetd
[ -f /etc/init/tftpd-hpa.conf ] && echo "manual" > /etc/init/tftpd-hpa.override
cat > /etc/xinetd.d/tftp << EOF
service tftp
{
@ -21,9 +24,12 @@ service tftp
port = 69
socket_type = dgram
wait = yes
user = nobody
user = root
server = /usr/sbin/in.tftpd
server_args = /tftpboot
server_args = --map-file /tftpboot/map-file /tftpboot
disable = no
}
EOF
# Adds support for tftp requests that don't include the directory name.
echo 'r ^([^/]) /tftpboot/\1' > /tftpboot/map-file