[Pkg-ltsp-devel] Bug#593770: LTSP clients should set up resolv.conf based on DHCP reply

Petter Reinholdtsen pere at hungry.com
Fri Aug 20 20:26:23 UTC 2010


Package:  ltsp-client-core
Version:  5.1.10-2
Severity: important
User:     debian-edu at lists.debian.org
UserTags: debian-edu

The LTSP clients are supposed to get their DNS setup from DHCP when it
is provided by DHCP.  The DHCP values should be used when generating
resolv.conf.  This is not done by LTSP clients at the moment.  Because
of this problem we added some code in Debian Edu for Lenny to
dynamically locate the DNS server (as the DHCP information was not
available on the LTSP client).  This process is slowing down the boot
on the clients to a point where it become a pain to boot the clients.

The DHCP configuration is fetched by ipconfig when called via the
configure_networking() function in
/usr/share/initramfs-tools/scripts/functions.  The values IPV4DNS0,
IPV4DNS1 and DNSDOMAIN are stored in /tmp/net-eth0.conf and passed on
to /usr/share/initramfs-tools/scripts/nfs-bottom/ltsp where they are
ignored.  The ltsp script sources the /tmp/net-*.conf script if the
hostname is not set, but should probably be made to source it every
time.

I propose to add something like this to the script before the code to
look for $DNS_SERVER and $SEARCH_DOMAIN.

  . /tmp/net-*.conf
  if [ "$IPV4DNS0" ] ; then
    DNS_SERVER="$IPV4DNS0"
  fi
  if [ "$DNSDOMAIN" ] ; then
    SEARCH_DOMAIN="$DNSDOMAIN"
  fi

It would also be nice if the code generating resolv.conf was adjusted
to use $IPV4DNS1 too, to get more than one DNS server in
resolv.conf. :)

Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-ltsp-devel mailing list