Bug 10301 - systemd/getty unused options
Summary: systemd/getty unused options
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2017.08
Hardware: All Linux
: P5 minor
Target Milestone: ---
Assignee: Yann E. MORIN
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-08 09:42 UTC by Michael Nosthoff
Modified: 2018-01-16 23:04 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Nosthoff 2017-09-08 09:42:36 UTC
Hi,

I stumbled across a minor issue with the getty configuration when using systemd.

In menuconfig I can set

BR2_TARGET_GENERIC_GETTY_TERM
BR2_TARGET_GENERIC_GETTY_OPTIONS

but it is only used for busybox and sysvinit.
So I guess this should be implemented or disabled when systemd is used.

I would supply a patch, but first wanted to know: Is there any technical reason why this is not implemented? 

Regards,
Michael
Comment 1 Yann E. MORIN 2017-09-08 16:55:43 UTC
Michael, All,

> In menuconfig I can set
> BR2_TARGET_GENERIC_GETTY_TERM
> BR2_TARGET_GENERIC_GETTY_OPTIONS
> but it is only used for busybox and sysvinit.
> So I guess this should be implemented or disabled when systemd is used.

Yes, true.

> Is there any technical reason why this is not implemented?

As far as I understand, systemd will automatically decide the value of
$TERM depending on the type of tty it is spawning on, see:
    https://github.com/systemd/systemd/commit/ccf22d4a104e6ed2666d6c5b4031981a84787790#diff-6af423bac2f70681895dc996361e6022

Also, we use the getty services orvided by Systemd as-is; we do not
provide our own, so we rely on systemd's behaviour here.

Now, maybe you could try to add an "Environement=TERM=blabla" directive
in /lib/systemd/system/getty@.service and see if that works.

If that works, we can see to come up with a way to do it.

Similarly for the getty options...

In the meantime, the by-far simplest solutiokn is to hide the options
from the menuconfig when usign systemd! ;-)

Regards,
Yann E. MORIN.
Comment 2 Thomas Petazzoni 2018-01-10 22:15:29 UTC
I've submitted at http://patchwork.ozlabs.org/patch/858587/ a patch that hides those options when systemd is used.