summaryrefslogtreecommitdiff
path: root/scripts/system/vyatta_update_console.pl
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-10-15 10:34:42 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-10-15 10:34:42 -0700
commit5a2647cdb13335b630e692f8b4c1e30ecfc7b8ac (patch)
tree44b59fecd5748de27c0ad32e3de77400381d767e /scripts/system/vyatta_update_console.pl
parentb8bc136065b6fcdbd123fe11b33b0dab055ff661 (diff)
downloadvyatta-cfg-system-5a2647cdb13335b630e692f8b4c1e30ecfc7b8ac.tar.gz
vyatta-cfg-system-5a2647cdb13335b630e692f8b4c1e30ecfc7b8ac.zip
Add ability to run modem getty
For some dial in lines, need HAYES modem support.
Diffstat (limited to 'scripts/system/vyatta_update_console.pl')
-rw-r--r--scripts/system/vyatta_update_console.pl12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/system/vyatta_update_console.pl b/scripts/system/vyatta_update_console.pl
index 388d3d2c..3c3b7d2d 100644
--- a/scripts/system/vyatta_update_console.pl
+++ b/scripts/system/vyatta_update_console.pl
@@ -57,8 +57,18 @@ sub update_inittab {
foreach my $tty ($config->listNodes()) {
my $speed = $config->returnValue("$tty speed");
$speed = 9600 unless $speed;
+ my $type = $config->returnValue("$tty type");
- print {$tmp} "T$id:23:respawn:/sbin/getty $speed $tty\n";
+ print {$tmp} "T$id:23:respawn:";
+
+ # Three cases modem, direct, and normal
+ if ($type eq "modem") {
+ print {$tmp} "/sbin/mgetty -x0 -s";
+ } else {
+ print {$tmp} "/sbin/getty";
+ print {$tmp} " -L" if ($type eq "direct");
+ }
+ print {$tmp} "$speed $tty\n";
++$id;
}
close $tmp;