1 |
On Mar 7, 2013 5:28 PM, "Alan McKinnon" <alan.mckinnon@×××××.com> wrote: |
2 |
> |
3 |
> Anyone know if there's a way to get /etc/hosts to support the notion of |
4 |
> an include file? I did my homework and found nothing, maybe someone else |
5 |
> knows more. |
6 |
> |
7 |
> I really do need this, I have an app that discovers things on the |
8 |
> network and knows their address. This makes it's automated way into DNS |
9 |
> but takes a few days, and another app needs to use the fqdn right now. |
10 |
> So /etc/hosts is the way to go for the interim three days. |
11 |
> |
12 |
> I've worked around it by creating /etc/hosts.d/ containing a header and |
13 |
> a data file. cat the two and redirect to /etc/hosts.d/hosts and the real |
14 |
> hosts file is a symlink to that. It's a sub-directory as none of these |
15 |
> apps run as root and only root can modiy the real hosts file. |
16 |
> |
17 |
> This works well enough, but a supported include mechanism would make |
18 |
> life so much simpler, not to mention easier for my colleagues to |
19 |
> understand what the blazes I set up :-) |
20 |
> |
21 |
> |
22 |
> |
23 |
> -- |
24 |
> Alan McKinnon |
25 |
> alan.mckinnon@×××××.com |
26 |
> |
27 |
> |
28 |
> |
29 |
|
30 |
See resolv.conf and nsswitch.conf |
31 |
|
32 |
More details later...but nsswitch, at least, is how one can mix hosts, DNS, |
33 |
NIS and winbind on the same box... |