From af70eb27981808621e43f4937b4d9eb7b525d8e6 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 2 Dec 2010 16:08:17 -0800 Subject: Allow more serial console lines Since inittab allows up to 4 characters for id field, allow 1000 entries. --- scripts/system/vyatta_update_console.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/system/vyatta_update_console.pl b/scripts/system/vyatta_update_console.pl index 5045a0dd..6b7ec11b 100755 --- a/scripts/system/vyatta_update_console.pl +++ b/scripts/system/vyatta_update_console.pl @@ -66,16 +66,16 @@ sub update_inittab { my $speed = $config->returnValue("$tty speed"); $speed = 9600 unless $speed; - print {$tmp} "T$id:23:respawn:"; + printf {$tmp} "T%d:23:respawn:", $id; if ($config->exists("$tty modem")) { printf {$tmp} "/sbin/mgetty -x0 -s %d %s\n", $speed, $tty; } else { printf {$tmp} "/sbin/getty -L %s %d vt100\n", $tty, $speed; } - # Limit to 0-9 because of limitation of last char in id field - if (++$id >= 10) { - warn "Ignoring $tty only 10 serial devices supported\n"; + # id field is limited to 4 characters + if (++$id >= 1000) { + warn "Ignoring $tty only 1000 serial devices supported\n"; last; } } -- cgit v1.2.3