WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How does TC handle the /etc/host file?  (Read 1895 times)

Offline TerryJC

  • Newbie
  • *
  • Posts: 43
How does TC handle the /etc/host file?
« on: January 07, 2011, 08:36:44 AM »
Can someone please explain exactly how TC deals with the /etc/host file during boot up?  I wanted to allow certain domains to be aliased to localhost, so I added the appropriate info to /etc/host on the running system.  This did what I wanted, so I added my updated host file to a remastered TC image.

Clearly, TC is generating the host file during boot up, because the change that I had made was not there.  How does TC derive the info in host?  Is there somewhere else that I can add this info so that it gets included?  Otherwise, is there a better way?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How does TC handle the /etc/host file?
« Reply #1 on: January 07, 2011, 10:04:58 AM »
What /etc/host file?
Did you mean /etc/hosts?
Why not setup a persistent tce directory and add
etc/hosts
to .filetool.lst?

Offline TerryJC

  • Newbie
  • *
  • Posts: 43
Re: How does TC handle the /etc/host file?
« Reply #2 on: January 07, 2011, 10:25:47 AM »
What /etc/host file?
Did you mean /etc/hosts?
Why not setup a persistent tce directory and add
etc/hosts
to .filetool.lst?

I've not got access to the TC disc ATM, but I could have sworn that the file I was editing was /etc/host.  However, on this Kubuntu machine it's /etc/hosts, so that must be it.

The reason I can't use a persistent tce directory is that the machines that I want to launch the Live disc on are going to be new and may well not have a hard disc installed.  I want it to serve up these pages 'out of the box' without anyone having to do anything other than point the browser at the home page.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: How does TC handle the /etc/host file?
« Reply #3 on: January 07, 2011, 10:34:57 AM »
Sounds like a remaster.

During boot....
/etc/init.d/tc-config calls sethostname
sethostname is a function that can be found in /etc/init.d/tc-functions
It is there that you will find what you want to edit for your remaster.
10+ Years Contributing to Linux Open Source Projects.

Offline TerryJC

  • Newbie
  • *
  • Posts: 43
Re: How does TC handle the /etc/host file?
« Reply #4 on: January 07, 2011, 11:12:15 AM »
Sounds like a remaster.

During boot....
/etc/init.d/tc-config calls sethostname
sethostname is a function that can be found in /etc/init.d/tc-functions
It is there that you will find what you want to edit for your remaster.

Thanks.