Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] /etc/hosts include file?
Date: Thu, 07 Mar 2013 22:26:45
1 Anyone know if there's a way to get /etc/hosts to support the notion of
2 an include file? I did my homework and found nothing, maybe someone else
3 knows more.
5 I really do need this, I have an app that discovers things on the
6 network and knows their address. This makes it's automated way into DNS
7 but takes a few days, and another app needs to use the fqdn right now.
8 So /etc/hosts is the way to go for the interim three days.
10 I've worked around it by creating /etc/hosts.d/ containing a header and
11 a data file. cat the two and redirect to /etc/hosts.d/hosts and the real
12 hosts file is a symlink to that. It's a sub-directory as none of these
13 apps run as root and only root can modiy the real hosts file.
15 This works well enough, but a supported include mechanism would make
16 life so much simpler, not to mention easier for my colleagues to
17 understand what the blazes I set up :-)
21 --
22 Alan McKinnon
23 alan.mckinnon@×××××.com


Subject Author
Re: [gentoo-user] /etc/hosts include file? Michael Mol <mikemol@×××××.com>
Re: [gentoo-user] /etc/hosts include file? Michael Mol <mikemol@×××××.com>
Re: [gentoo-user] /etc/hosts include file? Pandu Poluan <pandu@××××××.info>