diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-12-02 16:08:17 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-12-02 16:08:17 -0800 |
commit | af70eb27981808621e43f4937b4d9eb7b525d8e6 (patch) | |
tree | 3929331e39ae08ff5b94fd8dadd8b18f1c355329 | |
parent | 4c5e7207dd7a12990e9b10e0bb8ca9e61e312e79 (diff) | |
download | vyatta-cfg-quagga-af70eb27981808621e43f4937b4d9eb7b525d8e6.tar.gz vyatta-cfg-quagga-af70eb27981808621e43f4937b4d9eb7b525d8e6.zip |
Allow more serial console lines
Since inittab allows up to 4 characters for id field, allow 1000
entries.
-rwxr-xr-x | scripts/system/vyatta_update_console.pl | 8 |
1 files 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; } } |