util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. Werner Fink" <werner@suse.de>
To: Lennart Poettering <lennart@poettering.net>
Cc: util-linux@vger.kernel.org
Subject: Re: [util-linux] agetty and special chars @ and #
Date: Tue, 20 Nov 2012 10:26:54 +0100	[thread overview]
Message-ID: <20121120092654.GA4345@boole.suse.de> (raw)
In-Reply-To: <20121120004723.GH5922@tango.0pointer.de>

On Tue, Nov 20, 2012 at 01:47:23AM +0100, Lennart Poettering wrote:
> On Fri, 16.11.12 14:05, Karel Zak (kzak@redhat.com) wrote:
> 
> > 
> > On Fri, Nov 16, 2012 at 01:47:29PM +0100, Lennart Poettering wrote:
> > > On Fri, 16.11.12 11:14, Karel Zak (kzak@redhat.com) wrote:
> > > 
> > > > 
> > > > On Wed, Nov 14, 2012 at 03:27:20PM +0100, Dr. Werner Fink wrote:
> > > > > Indeed this is a good solution ... but in the case of systemd and its
> > > > > getty generator we may think about a /etc/agettytab with a similar
> > > > > syntax scheme as the old /etc/inittab to be able to provide agetty
> > > > > options based on the used tty line.  Clearly this /etc/agettytab should
> > > > > be parsed by agetty and options for the specified tty are found:
> > > > > 
> > > > >   1:tty1:--noclear %p
> > > > >   2:tty2:%p
> > > > >   3:tty3:%p
> > > > >   4:tty4:%p
> > > > >   5:tty5:%p
> > > > >   6:tty6:%p
> > > > >   S0:ttyS0:--erase-chars # --kill-chars @ -mt 60 %p 9600,2400,1200
> > > > >   S1:ttyS0:-L 9600 %p 9600 vt102
> > > > 
> > > >  Hmm, I guess it's still possible to create tty line specific config
> > > >  file on systems with systemd. I'd like to avoid another place where
> > > >  will be configuration.
> > > 
> > > Please do not add such a configuration file.
> > > 
> > > In systemd, if people want to configure line-specific getty
> > > configuration they should just copy
> > > /usr/lib/systemd/system/getty@.service to
> > > /etc/systemd/system/getty@ttyS0.service and edit it there. Since systemd
> > > will first look for instantiated unit files, and only then fall back to
> > > generic template this should do the right thing.
> > 
> > It would be nice to make it more obvious in systemd.special man page.
> 
> But the getty is actually not thaaaat special, it's actually just a unit
> like any other with no special semantics.
> 
> This general approach is actually well documented, for example most
> recently here:
> 
> http://0pointer.de/blog/projects/serial-console.html
> 
> Indirectly this all is also listed in the FAQ:
> 
> http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions

Hi Lennart,

you and also I know how to do this, nevertheless just one remark: for most
other users this is black magic (and most users are aliterate at the first
moment).  This because they are not aware how the systemd-getty-generator
nor how the getty services have to be read.  It is not at first glance
obviously from getty@.service nor serial-getty@.service how to get an other
getty for a special serial console nor how to have a getty with a special
option for e.g. for tty1.

The complexity level is to high due to the fact that there are to many
locations and set screws to influence the numbers, devices, and options
of the gettys.

If you like to avoid such simply approaches for agetty you may consider to
help normal users which do not work daily as system administrators to help
them by providing all infomations in a more comprehensible and user friendly
form in *one* file.  That could be that the getty-generator my use informations
from getty@.service and serial-getty@.service them self.

In other words: usability by striking simplicity :)

   Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr

  reply	other threads:[~2012-11-20  9:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-07 16:58 agetty and special chars @ and # Karel Zak
2012-11-12 10:04 ` Dr. Werner Fink
2012-11-12 13:29   ` Karel Zak
2012-11-14 14:27     ` Dr. Werner Fink
2012-11-16 10:14       ` Karel Zak
2012-11-16 12:47         ` Lennart Poettering
2012-11-16 13:05           ` Karel Zak
2012-11-20  0:47             ` Lennart Poettering
2012-11-20  9:26               ` Dr. Werner Fink [this message]
2012-11-20 16:59                 ` [util-linux] " Lennart Poettering

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=20121120092654.GA4345@boole.suse.de \
    --to=werner@suse.de \
    --cc=lennart@poettering.net \
    --cc=util-linux@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).