From b46c3454284e00dbe5ff8dc8b7d4b72aa4559b1f Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 18 Jun 2025 15:35:44 +0200 Subject: system: fix port name in boot baud rate detection Commit 75edff2 ("system: retrieve the serial console's baud rate at boot") added boot baud rate detection. Unfortunately the command was copy-pasted from the machine it was tested on, leaving a /dev/ttyS2 hard-coded in the command line! Also take this opportunity for properly redirecting stty's stderr, which currently does not work. --- sbin/init.d/system | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/init.d/system b/sbin/init.d/system index 3041891..82dd6ce 100755 --- a/sbin/init.d/system +++ b/sbin/init.d/system @@ -132,7 +132,7 @@ function update_consoles { # get the boot baud rate if none was set, or default to 115200 if [ -n "${name##*:*}" ]; then # try to get baud rate at boot - baud=$(stty /dev/null + baud=$(stty < "$path" 2>/dev/null | grep -o 'speed [0-9]*' | cut -f2 -d' ') if [ -n "$baud" ]; then name=${name}:$baud else -- 2.17.5