Skip to content

Update program_console_speed() in rc.local #22458#1811

Merged
yxieca merged 1 commit into
Azure:masterfrom
rajann:master
Nov 16, 2025
Merged

Update program_console_speed() in rc.local #22458#1811
yxieca merged 1 commit into
Azure:masterfrom
rajann:master

Conversation

@rajann

@rajann rajann commented Nov 15, 2025

Copy link
Copy Markdown
Contributor

This is the double commit of sonic-net/sonic-buildimage#22458

Why I did it

The --keep-baud option in agetty allows it to cycle through a set of baud rates (like 115200,57600,38400,9600) when it receives a break signal. This feature helps ensure that agetty can seamlessly adjust to different terminal speeds, enhancing compatibility across various setups.

Challenges with the sed Command:

Our current sed command (program_console_speed in rc.local ) is intended to update the baud rates in the serial-getty@.service based on the CONSOLE_SPEED variable. However, the command is not working as planned because the pattern --keep-baud .* %I doesn't match when %I isn't part of the file's content.

How I did it

To make the sed command more effective, we can simplify the matching pattern to focus solely on the baud rate list:
sed -i "s|--keep-baud .* -| $CONSOLE_SPEED -|g" /lib/systemd/system/serial-getty@.service
This adjustment should ensure that the command correctly updates the baud rate settings.

How to verify it

Verify serial-getty@.service before and after modifying rc.local

Before update

ExecStart=-/sbin/agetty -o '-p -- \u' --keep-baud 115200,57600,38400,9600 - $TERM

After Update

ExecStart=-/sbin/agetty -o '-p -- \u' 115200 - $TERM

Tested branch (Please provide the tested image version)

202501

Note: sonic-net/sonic-buildimage#24506

@rajann
rajann requested a review from lguohan as a code owner November 15, 2025 00:20
@rajann
rajann changed the base branch from master to 202501 November 15, 2025 00:31
@rajann
rajann changed the base branch from 202501 to master November 15, 2025 00:31
@yxieca
yxieca merged commit f0443bd into Azure:master Nov 16, 2025
4 checks passed
mssonicbld added a commit to mssonicbld/sonic-buildimage-msft that referenced this pull request Mar 26, 2026
…tically (#26380)

#### Why I did it
src/sonic-sairedis
```
* 58c20a05 - (HEAD -> master, origin/master, origin/HEAD) vpp: track CRM counters for routes (Azure#1811) (5 hours ago) [yue-fred-gao]
* 133fdcd4 - syncd: Add -W flag for platform specific watchdog timeout during initialization (Azure#1751) (9 hours ago) [Bojun Feng]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

2 participants