Skip to content

Commit

Permalink
T1327: Set the serial console speed to 115200 by default
Browse files Browse the repository at this point in the history
Set the default serial console speed to 115200 in system update scripts,
to accord with the changes in the build scripts.
  • Loading branch information
jestabro committed Apr 23, 2019
1 parent ad0de96 commit da4e1fa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/install/install-functions
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ add_console_entry () {
config_file=$2
sed -i -e "/console {/a \ \
device $console_dev {\n\
speed 9600\n\
speed 115200\n\
}" $config_file
}

Expand Down
4 changes: 2 additions & 2 deletions scripts/system/vyatta_update_console.pl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ sub update_getty{
if ($tty =~ /^hvc\d/) {
$speed = 38400 unless $speed;
} else {
$speed = 9600 unless $speed;
$speed = 115200 unless $speed;
}

while (<$sgetty>) {
Expand Down Expand Up @@ -121,7 +121,7 @@ sub update_grub {
return unless $config->exists("ttyS0");

my $speed = $config->returnValue("ttyS0 speed");
$speed = "9600" unless defined($speed);
$speed = "115200" unless defined($speed);

open(my $grub, '<', $GRUBCFG)
or die "Can't open $GRUBCFG: $!";
Expand Down
8 changes: 4 additions & 4 deletions scripts/vyatta-grub-setup
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ fi
pass_reset=/opt/vyatta/sbin/standalone_root_pw_reset

# Output to both console (last device is /dev/console)
vty_console="console=ttyS0,9600 console=tty0"
serial_console="console=tty0 console=ttyS0,9600"
usb_console="console=tty0 console=ttyUSB0,9600"
vty_console="console=ttyS0,115200 console=tty0"
serial_console="console=tty0 console=ttyS0,115200"
usb_console="console=tty0 console=ttyUSB0,115200"

# If vga_logo is set, enable use of the VGA monitor for displaying the
# logo during boot. The "vga=" boot command specifies a VGA mode that
Expand Down Expand Up @@ -152,7 +152,7 @@ fi
echo -e "set default=$default_console"
echo "set timeout=5"
# set serial console options
echo -e "serial --unit=0 --speed=9600"
echo -e "serial --unit=0 --speed=115200"
echo "terminal_output --append serial"
echo "terminal_input serial console"

Expand Down
4 changes: 2 additions & 2 deletions templates/system/console/device/node.tag/speed/node.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ syntax:expression: $VAR(@) in 1200, 2400, 4800, 9600, 19200, 38400, \
val_help: 1200; 1200 bps
val_help: 2400; 2400 bps
val_help: 4800; 4800 bps
val_help: 9600; 9600 bps (default for serial console)
val_help: 9600; 9600 bps
val_help: 19200; 19,200 bps
val_help: 38400; 38,400 bps (default for Xen console)
val_help: 57600; 57,600 bps
val_help: 115200; 115,200 bps
val_help: 115200; 115,200 bps (default for serial console)

0 comments on commit da4e1fa

Please sign in to comment.