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

View File

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