Problem
The contents of the /etc/hosts file may get corrupted when modifying
TCP/IP properties of the network card in the network configuration
manager. Any entries in /etc/hosts that contains the same IP
address string as the IP address of the network interface being
modified may be removed from the file.For example, assume the following entries are in /etc/hosts and the network card on the system uses an IP address of 192.168.1.10:
192.168.1.100 test0 192.168.1.101 test1 192.168.1.102 test2 192.168.1.103 test3 192.168.1.104 test4 192.168.1.105 test5 192.168.1.106 test6 192.168.1.107 test7 192.168.1.108 test8 192.168.1.109 test9 192.168.1.110 test10 192.168.1.111 test11 192.168.1.112 test12
Modify the protocol configuration for NIC's TCP/IP stack and simply exit the modification screen without making any modifications. After exiting the network configuration manager, the following entries in /etc/hosts will be removed:
192.168.1.100 test0 192.168.1.101 test1 192.168.1.102 test2 192.168.1.103 test3 192.168.1.104 test4 192.168.1.105 test5 192.168.1.106 test6 192.168.1.107 test7 192.168.1.108 test8 192.168.1.109 test9 192.168.1.110 test10
Solution
This has been reported to SCO Engineering.
The network configuration manager creates backup copy of the
/etc/hosts file, located at /tmp/etc.hosts.prev, before it alters
the contents. This file can be used to restore the removed lines in
/etc/hosts.