Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[16.0] Fix rungetty.sh to strip non-numeric suffix from console speed parameter#5436

Merged
eriknordmark merged 1 commit into
lf-edge:16.0from
rucoder:16.0-bp/5404
Nov 24, 2025
Merged

[16.0] Fix rungetty.sh to strip non-numeric suffix from console speed parameter#5436
eriknordmark merged 1 commit into
lf-edge:16.0from
rucoder:16.0-bp/5404

Conversation

@rucoder

@rucoder rucoder commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

Description

Backport of #5404

How to test and validate this PR

see original PR

Changelog notes

None

Checklist

  • I've provided a proper description

  • I've added the proper documentation

  • I've tested my PR on amd64 device

  • I've tested my PR on arm64 device

  • I've written the test verification instructions

  • I've set the proper labels to this PR

  • I've added a reference link to the original PR

  • PR's title follows the template

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

When console= kernel parameter includes format specifiers (e.g.,
console=ttyS0,115200n8), the script was passing the entire string
"115200n8" to agetty. While agetty can parse this format, it's cleaner
to extract only the numeric baud rate.

Besides getty fails to start on ttyS* and it causes continuous process restart
and extra CPU consumption

Changes:
- Extract and strip non-numeric suffix from speed parameter (e.g., "n8")
- Ensure empty or invalid speed values default to 115200

This results in cleaner agetty invocations like:
  /sbin/agetty -a root -L 115200 ttyS0 vt100
instead of:
  /sbin/agetty -a root -L 115200n8 ttyS0 vt100

Signed-off-by: Mikhail Malyshev <[email protected]>
(cherry picked from commit 39e0fe6)
@rucoder rucoder requested a review from rouming as a code owner November 24, 2025 11:16
@rucoder rucoder requested a review from rene November 24, 2025 11:17
@rucoder rucoder requested review from OhmSpectator and removed request for christoph-zededa and eriknordmark November 24, 2025 11:17
@eriknordmark eriknordmark merged commit f4eed67 into lf-edge:16.0 Nov 24, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants