个人工具

UbuntuHelp:UbuntuLTSP/HostnameFromDNS

来自Ubuntu中文

Wikibot讨论 | 贡献2010年5月20日 (四) 00:30的版本 (以内容'{{From|https://help.ubuntu.com/community/UbuntuLTSP/HostnameFromDNS}} {{Languages|UbuntuHelp:UbuntuLTSP/HostnameFromDNS}} {|border="1" cellspacing="0" |This page is specifi…'创建新页面)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索
This page is specific to Ubuntu versions 9.10

If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.


Sometimes it's interesting to have the thin clients hostname coming from DNS, through PTR (reverse) records. This script performs a DNS query with the thin client IP address and in case of a good answer, it sets the thin client hostname accordingly. http://hackers.propus.com.br/~marlon/ltsp/dns2hostname.py Important: do not use this script if you don't have PTR records for all your DHCP range. How to install the script into an i386 image:

DIR='/opt/ltsp/i386'
mount -t proc proc $DIR/proc
mount -t devpts devpts $DIR/dev/pts
chroot $DIR bash

# Under the chroot

cd /etc/init.d
wget -c http://hackers.propus.com.br/~marlon/ltsp/dns2hostname.py
chmod +x dns2hostname.py
apt-get install python-dnspython # if not installed
cd /etc/rcS.d
ln -s ../init.d/dns2hostname.py S33dns2hostname.py
exit

umount $DIR/dev/pts
umount $DIR/proc

ltsp-update-image --arch i386

Reboot your thin clients and test it. Good luck.