WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: udhcpc does not update hosts file  (Read 2266 times)

Offline khagberg

  • Newbie
  • *
  • Posts: 6
udhcpc does not update hosts file
« on: December 13, 2010, 11:02:49 AM »
When using udhcpc, i get my IP fine, question, should it update the hosts file. When I issue hostname -i it returns 127.0.0.1 which is what the hostname points to in the hosts file, it should return the actual IP.


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: udhcpc does not update hosts file
« Reply #1 on: December 13, 2010, 11:41:35 AM »
CentOS also has the hostname pointing to 127.0.0.1. in /etc/hosts.
This is common when using dhcp.
If you are using a static IP or a reserved dhcp address, edit /etc/hosts appropriately, and add etc/hosts to your .filetool.lst.