From cd5382ad4982731a7b7584173e9e4ee5108bc16e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 14 Oct 2010 14:44:06 -0700 Subject: Fix serial console setup functions Problems found during basic testing of new serial console config --- scripts/system/vyatta_update_console.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/system/vyatta_update_console.pl') 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; -- cgit v1.2.3