François Périchon
francois.perichon at univ-lille2.fr
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
http://bugzilla.ubuntu.com/show_bug.cgi?id=18466)
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}
fi
and in /etc/init.d/ltsp-client-setup:
configure_hostname() {
if [ -n "$DHCP_HOSTNAME" ]; then
cat <<EOF > /etc/hostname
$DHCP_HOSTNAME
EOF
fi
}
Do you think it's the correct way to solve this bug?
--
François
More information about the ubuntu-devel
mailing list