[systemd-devel] systemd version of an inittab entry -- for VT100 terminal

Filipe Brandenburger filbranden at google.com
Tue Jun 26 20:22:01 UTC 2018


On Tue, Jun 26, 2018 at 1:16 PM Lennart Poettering
<lennart at poettering.net> wrote:
> On Di, 26.06.18 20:10, Michael Asher (masher at deltatau.com) wrote:
> > Thank you very much.
> >
> > How do I change the settings from vt220 to vt100 and the baud rate
> > to 115200?
>
> Make your own copy of the vendor supplied unit file, and alter it to
> your needs. Use "cp /usr/lib/systemd/system/serial-getty at .service
> /etc/systemd/system/serial-getty at ttyS0.service" to make the copy. Then edit
> /etc/systemd/system/serial-getty at ttyS0.service with any editor of your
> choice, then issue "systemctl daemon-reload" to make systemd aware of
> your changes and "systemctl restart serial-getty at ttyS0.service" to
> restart the getty.

Also possible to just override the setting you need (ExecStart=) with
an override file, which you can create using:

  $ systemctl edit serial-getty at ttyS0.service

And then replacing the command-line by using something like:

  [Service]
  ExecStart=
  ExecStart=/sbin/getty -L %I 115200 vt100

The first ExecStart= is needed to reset the setting (erase the one
from the default file.)

Note that the default one passes $TERM to agetty, so if setting TERM
correctly is all you need, then this might be enough:

  [Service]
  Environment=TERM=vt100

Cheers,
Filipe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4851 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180626/ffbb9b78/attachment-0001.bin>


More information about the systemd-devel mailing list