public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: William Hubbs <williamh@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Christian Kniep <ckniep@gaikai.com>
Subject: Re: [gentoo-dev] rfc: /etc/hostname on gentoo
Date: Tue, 23 Aug 2016 16:22:18 -0500	[thread overview]
Message-ID: <20160823212218.GA21784@whubbs1.gaikai.biz> (raw)
In-Reply-To: <CAGfcS_mT4T_7HkHdfskJax3PHFtu-rKQ8iD++kiyVdWpJyTt=g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2059 bytes --]

On Tue, Aug 23, 2016 at 04:25:30PM -0400, Rich Freeman wrote:
> On Tue, Aug 23, 2016 at 3:57 PM, William Hubbs <williamh@gentoo.org> wrote:
> >
> > I am planning to change the logic in /etc/init.d/hostname so that if
> > /etc/hostname exists, the first word out of that file will be used as
> > the hostname rather than any setting in /etc/conf.d/hostname. If you
> > don't want /etc/hostname, just don't create it and the settings from
> > /etc/conf.d/hostname will still be used.
> >
> 
> Keep in mind that this is potentially problematic for a few reasons:
> 
> 1.  The hostname could change after openrc is done setting it.  If it
> does, a program that reads /etc/hostname won't get the real hostname.
 
 This is also true for /etc/conf.d/hostname, so I don't see the problem
 here.

> 2.  You could have a situation where multiple containers use the same
> /etc.  Obviously in this situation you wouldn't want to store the
> hostname anywhere in /etc unless you wanted them to all have the same
> hostname.  It would be better to obtain it from dhcp, or to have it
> set before init is run during initialization.

/etc/init.d/hostname doesn't run inside containers, so this is not
relevant.

> The main danger is people not thinking of all the scenarios.  I'm not
> quite sure why we even need /etc/hostname now given these issues and
> the fact that we've apparently gotten along for a long time without
> it.  Have we ever gotten around to making /etc/mtab a symlink yet?  I
> know it wasn't for a long time.  It seems like we are moving away from
> container support when we should be moving towards it if anything...

Container support is controlled by the keyword line in dependencies.
OpenRC can detect most containers, so if you put the proper keywords on
that line and RC_SYS is set correctly or the container is autodetected
properly, openrc will not run the scripts that it shouldn't run in the
container.

Yes, /etc/mtab is a symlink by default now; that was taken care of a
while back.

William


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2016-08-23 21:22 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-22 15:58 [gentoo-dev] rfc: /etc/hostname on gentoo William Hubbs
2016-08-22 16:11 ` M. J. Everitt
2016-08-22 16:39   ` Rich Freeman
2016-08-22 17:03     ` William Hubbs
2016-08-22 17:32       ` Rich Freeman
2016-08-22 17:28 ` Michael Orlitzky
2016-08-22 17:51   ` Sven Vermeulen
2016-08-22 18:29     ` Rich Freeman
2016-08-23 19:59       ` Marc Schiffbauer
2016-08-22 17:37 ` Matthew Thode
2016-08-22 17:51 ` Matthew Thode
2016-08-22 19:18 ` Dirkjan Ochtman
2016-08-22 19:28 ` Hans de Graaff
2016-08-22 20:01   ` William Hubbs
2016-08-22 22:09   ` William Hubbs
2016-08-23  6:39     ` Daniel Campbell
2016-08-23  7:01       ` Christian Kniep
2016-08-23 12:33         ` Michael Orlitzky
2016-08-23 10:01       ` Rich Freeman
2016-08-23 12:26         ` Christian Kniep
2016-08-23 18:45           ` Rich Freeman
2016-08-23 19:57             ` William Hubbs
2016-08-23 20:25               ` Rich Freeman
2016-08-23 21:22                 ` William Hubbs [this message]
2016-08-24  6:52                   ` Christian Kniep
2016-08-24  6:56                     ` Christian Kniep
2016-08-24 10:46                     ` Rich Freeman
2016-08-24  7:12               ` Daniel Campbell
2016-08-24 11:17                 ` Michael Orlitzky
2016-08-24 11:37                   ` Daniel Campbell
2016-08-24 11:42                     ` Michael Orlitzky
2016-08-24 12:40                       ` Rich Freeman
2016-08-24 15:49                       ` Mike Gilbert
2016-08-24 16:06                         ` Michael Orlitzky
2016-08-24 16:22                           ` Zac Medico
2016-08-24 16:33                             ` Michael Orlitzky
2016-08-24 16:42                               ` Zac Medico
2016-08-24 19:23                                 ` Consus
2016-08-24 22:43                                   ` Cédric Krier
2016-08-28  6:30                                 ` Daniel Campbell
2016-08-28  6:48                                   ` Michał Górny
2016-08-28  7:24                                     ` Daniel Campbell
2016-08-28  6:57                                   ` M. J. Everitt
2016-08-28  8:10                                   ` Zac Medico
2016-08-28 12:34                                   ` Patrick Lauer
2016-08-28 14:16                                     ` Rich Freeman
2016-08-28 14:21                                     ` Michał Górny
2016-08-28 15:29                                       ` Patrick Lauer
2016-08-28 15:54                                         ` Rich Freeman
2016-08-25  4:11                         ` [gentoo-dev] " Duncan
2016-08-25 12:50                           ` Mike Gilbert
2016-08-25 13:42                             ` Rich Freeman
2016-08-24  8:02               ` Martin Vaeth
2016-08-23 12:17     ` [gentoo-dev] " Michael Orlitzky
2016-08-28 18:15 ` William Hubbs
2016-08-31 21:24   ` Daniel Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160823212218.GA21784@whubbs1.gaikai.biz \
    --to=williamh@gentoo.org \
    --cc=ckniep@gaikai.com \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox