François Périchon francois.perichon at
Tue Nov 22 03:35:42 CST 2005

I'am trying to get the hostname obtained by dhcp correctly set up at
boot time in a breezy/ltsp system.
Domain, hostname aren't passed to the real init (see

Before the nfs root filesystem is mounted, the ipconfig command is
launched and write all the information it gets in the file
/tmp/net-{$DEVICE}.conf which is immediately included in the script.
Those informations are not used and lost.

To correct this, I export the useful variables so that the rcS scripts
could be aware of them.

file scripts/nfs:
        ipconfig ${DEVICE}
        . /tmp/net-${DEVICE}.conf

        if [ -n ${HOSTNAME} ]; then
                export DHCP_HOSTNAME=${HOSTNAME}

and in /etc/init.d/ltsp-client-setup:
configure_hostname() {
    if [ -n "$DHCP_HOSTNAME" ]; then
    cat <<EOF > /etc/hostname

Do you think it's the correct way to solve this bug?

More information about the ubuntu-devel mailing list