ltsp ubuntu 12.04 lts.conf fix for tftp

Hi,

If you are wondering if your thin-client doesn’t recognise the options with the

netkit-tftpd

in the lts.conf file placed in the tftp-boot dir please replace your

/opt/ltsp/i386/usr/share/ltsp/init-ltsp.d/05-getltsconffile

to this one

# get the lts.conf via tftp

# $filename comes from net-eth0.conf and is usually "/<path>/pxelinux.0".
# If it contains a path, we want to construct "/<path>/lts.conf".
# If it doesn't, we want just "lts.conf" without inserting a slash, as some tftp
# servers have problems with it. Finally, if $filename isn't set, we want to
# default to "ltsp/i386/lts.conf".
if [ -n "$SERVER" ]; then
    fileonly=${filename##*/}
    pathonly=${filename%$fileonly}
    lts_conf_temp=$(mktemp)
    tftp "$SERVER" -c get ${pathonly:-ltsp/i386/}lts.conf $lts_conf_temp >/dev/null
    # only overwrite lts.conf if it has non-zero size.
    if [ -s "$lts_conf_temp" ]; then
        mv "$lts_conf_temp" /etc/lts.conf
    else
        rm "$lts_conf_temp"
    fi
fi

# Get the lts.conf vars into the environment
. /usr/share/ltsp/ltsp_config

..or install the tftpd-hpa package!

Have fun!