Thin Client /etc/hosts entry
Gavin McCullagh
gmccullagh at gmail.com
Wed Jan 14 10:46:29 GMT 2009
Hi,
On Mon, 12 Jan 2009, M Rathburn wrote:
> How do I make entries into the /etc/hosts for PXE i386 thin clients? I
> noticed that when I chrooted and tried to edit the file, it shows:
>
> #This is a ltsp chroot and this file will be rewritten in boot process
> #of terminal.
> 127.0.0.1 localhost
>
> So where would I make the entries so they'll propagate to the TC's?
A while back I used ltsp to network boot a bunch of servers. I created a
file called
/etc/init.d/customise_client
made it executable and linked it into /etc/rc2.d/ so the script ran on
boot.
The script did a bunch of things like:
echo "w.x.y.z hostname1" >> /etc/hosts
echo "w.x.y.z hostname2" >> /etc/hosts
echo "w.x.y.z hostname3" >> /etc/hosts
It also ran something like:
mac=`ip addr show eth0 | grep 'link/ether' | cut -f 6 -d " "`
to identify the machine by their mac address, then I had a case statement
which compared $mac to a bunch of known macs and made machine-specific
customisations.
This (particularly the machine-specific bit) is not very scalable and not
very pretty, but it suited my purpose.
Gavin
More information about the edubuntu-users
mailing list