[systemd-devel] systemd, getty and udev

Kay Sievers kay.sievers at vrfy.org
Wed Mar 23 04:38:53 PDT 2011


On Wed, Mar 23, 2011 at 12:33, Michael Olbrich <m.olbrich at pengutronix.de> wrote:
> On Wed, Mar 23, 2011 at 02:00:56PM +0300, Andrey Borzenkov wrote:
>> 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?
>
> The units are all added correctly but without the "systemd" tag in udev
> "systemd[1]: dev-ttyAMA0.device changed dead -> plugged" never happens.
> As a result the getty is never started.

I guess, we could just add all 'special' ttys like:
  KERNEL=="tty[a-zA-Z]*"

Kay


More information about the systemd-devel mailing list