summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-10-14 14:44:06 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-10-14 14:44:06 -0700
commitcd5382ad4982731a7b7584173e9e4ee5108bc16e (patch)
tree81a29860ddb0a85f63be3bc55ee784120dc4be14
parent9a09a382f874510f3427cf0a212b87fdb5b8e8d2 (diff)
downloadvyatta-cfg-quagga-cd5382ad4982731a7b7584173e9e4ee5108bc16e.tar.gz
vyatta-cfg-quagga-cd5382ad4982731a7b7584173e9e4ee5108bc16e.zip
Fix serial console setup functions
Problems found during basic testing of new serial console config
-rw-r--r--scripts/system/vyatta_update_console.pl4
-rw-r--r--templates/system/console/node.def1
-rw-r--r--templates/system/console/node.tag/speed/node.def4
3 files changed, 4 insertions, 5 deletions
diff --git a/scripts/system/vyatta_update_console.pl b/scripts/system/vyatta_update_console.pl
index 84cf7488..a6c08916 100644
--- a/scripts/system/vyatta_update_console.pl
+++ b/scripts/system/vyatta_update_console.pl
@@ -38,7 +38,7 @@ sub update_inittab {
or die "Can't open $TMPTAB";
# Clone original inittab but remove all references to serial lines
- print {$tmp} grep { ~ /^T/ } <$inittab>;
+ print {$tmp} grep { ! /^T/ } <$inittab>;
close $inittab;
my $config = new Vyatta::Config;
@@ -49,7 +49,7 @@ sub update_inittab {
my $speed = $config->returnValue("$tty speed");
$speed = 9600 unless $speed;
- print {$tmp} "T$id:23:respawn:/sbin/getty $speed $tty";
+ print {$tmp} "T$id:23:respawn:/sbin/getty $speed $tty\n";
++$id;
}
close $tmp;
diff --git a/templates/system/console/node.def b/templates/system/console/node.def
index 9e946c7e..b3c11f2a 100644
--- a/templates/system/console/node.def
+++ b/templates/system/console/node.def
@@ -1,7 +1,6 @@
tag:
type: txt
help: Serial console configuration
-allowed: (cd $dev; echo tty*)
syntax:expression: pattern $VAR(@) "^tty[A-Z0-9]+$" \
; "console $VAR(@): not a valid tty name"
end: /opt/vyatta/sbin/vyatta_update_console.pl
diff --git a/templates/system/console/node.tag/speed/node.def b/templates/system/console/node.tag/speed/node.def
index cf2a0d09..637f12c7 100644
--- a/templates/system/console/node.tag/speed/node.def
+++ b/templates/system/console/node.tag/speed/node.def
@@ -1,6 +1,6 @@
type: u32
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"
+syntax:expression: $VAR(@) in 1200, 2400, 4800, 9600, 19200, 38400, \
+ 57600, 115200 ; "unknown baud rate"
val_help: u32: 1200-115200: Baud rate for console port