Hello Mantas,

On 12/13/2013 04:17 PM, Mantas Mikulėnas wrote:
> 
> On Dec 13, 2013 10:09 AM, "Gao feng" <gaof...@cn.fujitsu.com 
> <mailto:gaof...@cn.fujitsu.com>> wrote:
>>
>> Hi,
>>
>> As we know, systemd only forks getty on ttyX when we press ctrl + alt + FX.
>> I whould like to let systemd forks server gettys on all of tty deivces by 
>> default.
>> this is very useful in container environment, since we can't use ctrl+alt+FX
>> to trigger getty in container.
> 
> ...do containers even have such devices?
> 

pts device ;)

> Anyway, just enable more instances of getty@.service for all devices you 
> need, just like getty@tty1.service is started by default.
> 
> The autostart that you mention is part of logind and all it does is just 
> start the same services via systemd, no magic.
> 

getty@tty1.service under /etc/systemd/system/getty.target.wants/ is linked to 
/usr/lib/systemd/system/getty@.service,
so I create getty@tty2.service which links to 
/usr/lib/systemd/system/getty@.service too. is this right?

In libvirt lxc, the ttyX actually is pts devices.

[root@localhost getty.target.wants]# ll
total 0
lrwxrwxrwx 1 root root 38 Dec 13 02:49 getty@tty1.service -> 
/usr/lib/systemd/system/getty@.service
lrwxrwxrwx 1 root root 38 Dec 13 03:22 getty@tty2.service -> 
/usr/lib/systemd/system/getty@.service

seems like in my container, agetty listens on /dev/console, not tty1 or tty2
/sbin/agetty --noclear --keep-baud console 115200 38400 9600

it seems getty-generator does the extra job.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to