From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E5C33198003 for ; Fri, 8 Mar 2013 15:39:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A02B8E076C; Fri, 8 Mar 2013 15:39:11 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 455E6E074E for ; Fri, 8 Mar 2013 15:39:10 +0000 (UTC) Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 74AF720391 for ; Fri, 8 Mar 2013 10:39:09 -0500 (EST) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 08 Mar 2013 10:39:09 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=binarywings.net; h=message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=mesmtp; bh=0T6HqAn4GtnNVXA+9SyjugRi 7TM=; b=hOXWJa05eIsichbL5q4aaVxDK/3lDuqw855bTISMEe4pWWFayhpeloQM dklmjzsmw10YpESyvSdf4AIzv2ZvtqkZBQb17vc/f9FM6NDdyG93hR0lOJJTEoBG 07x/DhGDOR8gnpGmNZYOiuM2NKSWKS8J+lrlbABS4AEaIMzvE5A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type; s=smtpout; bh=0T6H qAn4GtnNVXA+9SyjugRi7TM=; b=LFzYR/HyaK2UMhHx3l4oIgqf+qBO9LM5dMj4 Q9Y5WA4yzS69RlDN9Lv1AOMmqKLCWaOcjqb5qWnrCRLvsqNvYg8hz7zATvzZZYIt aU6EoRbjmvjBMnVKEmuBUPJHzHjgGVwuK1DA/8XisED2tMS0P8zI5EU2R01yfgpp u4BiPAg= X-Sasl-enc: jHE+SQrIA4uepWudWzW8lfnI7eTqeKjnb3R/tSdk1RWQ 1362757148 Received: from [192.168.5.18] (unknown [83.169.5.6]) by mail.messagingengine.com (Postfix) with ESMTPA id 60DCEC80E8A for ; Fri, 8 Mar 2013 10:39:08 -0500 (EST) Message-ID: <513A0615.2060404@binarywings.net> Date: Fri, 08 Mar 2013 16:39:01 +0100 From: Florian Philipp User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130304 Thunderbird/17.0.3 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] /etc/hosts include file? References: <51391398.1030100@gmail.com> <513930FF.6030003@gmail.com> In-Reply-To: <513930FF.6030003@gmail.com> X-Enigmail-Version: 1.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2OUWGMXUABAQVOLSIEGJL" X-Archives-Salt: e83b2b32-a2ca-4cfe-990d-1dba2825bb4b X-Archives-Hash: bb96e978d84b1a8c0cf0d6e1a8c38316 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2OUWGMXUABAQVOLSIEGJL Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 08.03.2013 01:29, schrieb Michael Mol: > On 03/07/2013 05:24 PM, Alan McKinnon wrote: >> Anyone know if there's a way to get /etc/hosts to support the notion o= f >> an include file? I did my homework and found nothing, maybe someone el= se >> knows more. >> >> I really do need this, I have an app that discovers things on the >> network and knows their address. This makes it's automated way into DN= S >> but takes a few days, and another app needs to use the fqdn right now.= >> So /etc/hosts is the way to go for the interim three days. >> >> I've worked around it by creating /etc/hosts.d/ containing a header an= d >> a data file. cat the two and redirect to /etc/hosts.d/hosts and the re= al >> hosts file is a symlink to that. It's a sub-directory as none of these= >> apps run as root and only root can modiy the real hosts file. >> >> This works well enough, but a supported include mechanism would make >> life so much simpler, not to mention easier for my colleagues to >> understand what the blazes I set up :-) >=20 > No, there's not an "include" directive. >=20 > There are, however, two other ways to get hostnames recognized. >=20 > The first is /etc/resolv.conf . You can point your host at a local DNS > server which is aware of the discovered hosts, and which forwards the > rest of the queries. (This is how Samba 4's internal DNS server > operates; anything it knows, it responds to. Everything else, it forwar= ds.) >=20 dnsmasq also works like this and is probably easier to set up. FWIW it also supports include files. Regards, Florian Philipp ------enig2OUWGMXUABAQVOLSIEGJL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlE6BhkACgkQqs4uOUlOuU/KcwCfbjWTmHzX4JwN/8vZ431I97DS abkAnRjXDSSDpDxaks9ez8RpMpCeAAn2 =XElj -----END PGP SIGNATURE----- ------enig2OUWGMXUABAQVOLSIEGJL--