summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim <kim.sidney@gmail.com>2019-01-23 11:09:25 +0100
committerGitHub <noreply@github.com>2019-01-23 11:09:25 +0100
commit85dc32785d785eca5512ceec78b2058c0aaa6b67 (patch)
tree0850f28f40515c5127cc99d717378a62f995efde
parent6eb6da4f7d7111d46b201e8670aa0f5684bb51e3 (diff)
downloadvyatta-cfg-system-85dc32785d785eca5512ceec78b2058c0aaa6b67.tar.gz
vyatta-cfg-system-85dc32785d785eca5512ceec78b2058c0aaa6b67.zip
T980 and T969 update serial console baud on the fly
* update serial console baud on the fly * Update help of console speed, a reboot is not required anymore to set the correct baud rate.
-rwxr-xr-xscripts/system/vyatta_update_console.pl2
-rw-r--r--templates/system/console/device/node.tag/speed/node.def2
2 files changed, 3 insertions, 1 deletions
diff --git a/scripts/system/vyatta_update_console.pl b/scripts/system/vyatta_update_console.pl
index ff7c2df1..79ad3617 100755
--- a/scripts/system/vyatta_update_console.pl
+++ b/scripts/system/vyatta_update_console.pl
@@ -102,6 +102,8 @@ sub update_getty{
system("systemctl daemon-reload");
if ( system("systemctl status serial-getty\@$tty.service 2>&1 > /dev/null")) {
system("systemctl start serial-getty\@$tty.service");
+ } else {
+ system("/bin/stty -F /dev/$tty $speed cstopb");
}
}
}
diff --git a/templates/system/console/device/node.tag/speed/node.def b/templates/system/console/device/node.tag/speed/node.def
index 3a117301..6f270821 100644
--- a/templates/system/console/device/node.tag/speed/node.def
+++ b/templates/system/console/device/node.tag/speed/node.def
@@ -1,5 +1,5 @@
type: u32
-help: Console baud rate. New rate will take effect on reboot.
+help: Console baud rate.
allowed: echo 1200 2400 4800 9600 19200 38400 57600 115200
syntax:expression: $VAR(@) in 1200, 2400, 4800, 9600, 19200, 38400, \
57600, 115200 ; "unknown baud rate"