Solaris 9 x86 : DHCP "unknown" hostname problemMethod 1
The reason , that hostname is set to "unknown" is the fact , that dhcpinfo does not return hostname as expected by system scripts. This is why we propose to change two system scripts :
The first of these scripts calls another script
You have to understand how this test.sh script works. The idea is the following : my ISP provider assigns the following hostname to my Solaris box connected via cable modem :
c20-130.icpnet.pl , where icpnet.pl is unique domain name and c20-130 is created from IP address , in my example the IP was 126.96.36.199. It means the permanent part 62.21 is omitted and replaced by corresponding domain icpnet.pl and the rest corresponding to my host is added. You have to change this part in test.sh script which is ISP provider specific, for example domain.name and the convention to create the rest of hostname. You may for example choose to set hostname equal to IP address.
Warning : make backup of above two system scripts. Learn recovery procedure before applying these changes. You cannot build in any syntax errors into these scripts. Please test in /sbin/sh environment, and not for example in bash.
Reboot the system after applying these changes.
In this method no system scripts are changed. Two scripts are added :
It is the same script used in method 2. Then the second script is
Notice the second script has the same name as original /sbin/dhcpinfo program. Thus before copying this script from the supplied archive into /sbin directory do the following
cp dhcpinfo backup
cp dhcpinfo olddhcpinfo
As a result You should obtain hostname set to the real hostname, assigned to Your PC by Your provider's DHCP server, and under which Your computer is visible/accessible from the Internet
Document created on 5.1.2004