#!/usr/local/bin/perl # list_mgetty.cgi # Displays a list of serial ports on which mgetty is enabled by searching # for them in /etc/inittab require './pap-lib.pl'; $access{'mgetty'} || &error($text{'mgetty_ecannot'}); &foreign_require("inittab", "inittab-lib.pl"); &ui_print_header(undef, $text{'mgetty_title'}, ""); if (!&has_command($config{'mgetty'})) { print "
",&text('mgetty_ecmd', "$config{'mgetty'}"),"
\n"; &ui_print_footer("", $text{'index_return'}); exit; } print &text('mgetty_desc', "mgetty"),"
\n";
@mgi = &mgetty_inittabs();
if (@mgi) {
print "$text{'mgetty_add'}
\n";
print "
$text{'mgetty_tty'} | ", "$text{'mgetty_type'} | ", "$text{'mgetty_speed'} | ", "$text{'mgetty_answer'} | ", "$text{'mgetty_config'} | ||||||
", "$tty | \n"; print "",$m->{'direct'} ? $text{'mgetty_direct'} : $text{'mgetty_modem'}," | \n"; print "",$m->{'speed'} || $text{'mgetty_auto'}," | \n"; print "",defined($m->{'rings'}) ? $m->{'rings'} : 1," $text{'mgetty_rings'} | \n"; local $fn = $m->{'tty'}; $fn =~ s/^\/dev\///; $fn =~ s/\//\./g; if ($access{'options'}) { print "", "$text{'mgetty_cedit'} | \n"; } else { print "$tty | \n"; print "$text{'mgetty_vgetty'} | \n"; } print "
\n"; } print "$text{'mgetty_add'}
\n"; print &ui_hr(); print "
\n"; &ui_print_footer("", $text{'index_return'});