[systemd-devel] getty : how to run getty on every ttyX

Daniel P. Berrange berrange at redhat.com
Fri Dec 13 08:28:01 PST 2013


On Fri, Dec 13, 2013 at 05:20:19PM +0100, Lennart Poettering wrote:
> On Fri, 13.12.13 16:15, Lennart Poettering (lennart at poettering.net) wrote:
> 
> > > We had discussed this back at Linux Plumbers last year, and at the time
> > > you had suggested that rather than create /dev/ttyN symlinks we should
> > > instead do something like  /dev/containerttyN instead, and set a
> > > 'container_tty' variable containing a list of all those device names
> > > so that systemd can discover them sensibly. We never got around to
> > > doing this from the libvirt side, and AFAIK systemd hasn't done anything
> > > on its side either. So is this still a suitable way forward ?
> > 
> > Yeah, I am pretty sure that's what we should do. I figure I should hack
> > that up. I'll work on it now.
> 
> Committed. "systemd-getty-generator" will now look for $container_ttys
> set as an environment variable for PID 1. If that is set it will split
> the string up on whitespaces and start a getty on all ptys
> referenced. Note that this only supports ptys, not any other ttys. 
> 
> Example:
> 
> "container_ttys=pts/5 pts/8 pts/15"
> 
> when pass to PID 1 will spawn three additional gettys on ptys 5, 8 and
> 15.
> 
> Note that this *really* only supports ptys, not any other kinds of ttys,
> sinc for those we require propery device enumeration and notification
> and we don't have those in containers... I still chose to name this
> $container_ttys rather than $container_ptys, so that maybe one day we
> can extend it should devices like this ever get virtualized.
> 
> This will be in systemd 209.

Great, that all sounds good to me.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


More information about the systemd-devel mailing list