[systemd-devel] systemd, getty and udev

Andrey Borzenkov arvidjaar at gmail.com
Wed Mar 23 04:00:56 PDT 2011


On Wed, Mar 23, 2011 at 10:22 AM, Michael Olbrich
<m.olbrich at pengutronix.de> wrote:
> On Mon, Mar 21, 2011 at 08:05:44PM +0300, Andrey Borzenkov wrote:
>> On Mon, Mar 21, 2011 at 6:06 PM, Michael Olbrich
>> <m.olbrich at pengutronix.de> wrote:
>>
>> >> The default systemd files only start getties on a handful of ttys. Since
>> >> it seems impossible to distinguish between display ttys and e.g. modem
>> >> ttys, one can't just simply start gettys on all tty*, thus necessiting
>> >> manual addition for further ttys in the udev rules.
>> >
>> > hmmm, that is unfortunate. There are a lot of different names for the
>> > serial ports on embedded systems. And using a serial console here is rather
>> > common. Maybe the tty from /sys/class/tty/console/active can always be
>> > added somehow?
>> >
>>
>> src/getty-generator.c:        if
>> (read_one_line_file("/sys/class/tty/console/active", &active) >= 0) {
>
> That's not what I meant. This only adds the serial tty unit. However it is
> never started unless the associated device gets the udev 'systemd' tag.
>

This unit is also added as WantedBy to getty.target; and getty.target
should be pulled in by multi-user.target. Does not it happen?

Or do you mean, it should be always unconditionally started?

> I don't know much about udev syntax. Basically something like this:
> SUBSYSTEM=="tty", KERNEL=="`cat /sys/class/tty/console/active`", TAG+="systemd"
>

Looks, like


More information about the systemd-devel mailing list