old-www/HOWTO/Remote-Serial-Console-HOWTO/getty-mgetty.html

402 lines
5.7 KiB
HTML

<HTML
><HEAD
><TITLE
>mgetty</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Remote Serial Console HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Configure getty"
HREF="getty.html"><LINK
REL="PREVIOUS"
TITLE="agetty"
HREF="getty-agetty.html"><LINK
REL="NEXT"
TITLE="mingetty"
HREF="getty-mingetty.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Remote Serial Console HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="getty-agetty.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 6. Configure <SPAN
CLASS="PRODUCTNAME"
>getty</SPAN
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="getty-mingetty.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="GETTY-MGETTY"
></A
>6.4. <SPAN
CLASS="PRODUCTNAME"
>mgetty</SPAN
></H1
><P
><SPAN
CLASS="PRODUCTNAME"
>mgetty</SPAN
> is a modem-aware
<SPAN
CLASS="APPLICATION"
>getty</SPAN
>. It supports modems with the
Hayes <SPAN
CLASS="ACRONYM"
>AT</SPAN
> command set and is especially designed
for supporting modems that are used to send faxes and to dial out
as well as dial in. These features are not required for a serial
console.</P
><P
><SPAN
CLASS="APPLICATION"
>mgetty</SPAN
> does not require the
traditional <TT
CLASS="FILENAME"
>/etc/gettydefs</TT
> file. As a result
<SPAN
CLASS="APPLICATION"
>mgetty</SPAN
> is invoked from
<TT
CLASS="FILENAME"
>/etc/inittab</TT
> without supplying an entry in
<TT
CLASS="FILENAME"
>/etc/gettydefs</TT
>.</P
><DIV
CLASS="FIGURE"
><A
NAME="GETTY-MGETTY-INITTAB"
></A
><P
><B
>Figure 6-7. <TT
CLASS="FILENAME"
>/etc/inittab</TT
> entry for
<SPAN
CLASS="APPLICATION"
>mgetty</SPAN
></B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>co:2345:respawn:/sbin/mgetty ttyS0</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><P
><SPAN
CLASS="APPLICATION"
>mgetty</SPAN
> is configured using the
file <TT
CLASS="FILENAME"
>/etc/mgetty+sendfax/mgetty.config</TT
>. It
should contain an entry for the port used by the serial
console.</P
><DIV
CLASS="FIGURE"
><A
NAME="AEN1687"
></A
><P
><B
>Figure 6-8. <SPAN
CLASS="APPLICATION"
>mgetty</SPAN
> configuration file
<TT
CLASS="FILENAME"
>mgetty.config</TT
></B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>port ttyS0
speed 9600
direct yes
data-only yes
toggle-dtr yes
need-dsr yes
port-owner root
port-group root
port-mode 600
login-prompt @ \P login:\040
login-time 60
term vt102</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><P
>All the options are documented in the
<SPAN
CLASS="PRODUCTNAME"
>PostScript</SPAN
> file
<TT
CLASS="FILENAME"
>/usr/share/doc/mgetty&#8230;/mgetty.ps</TT
>.</P
><P
>We set <TT
CLASS="LITERAL"
>direct</TT
>,
<TT
CLASS="LITERAL"
>data-only</TT
>, <TT
CLASS="LITERAL"
>need-dsr</TT
> and
<TT
CLASS="LITERAL"
>toggle-dtr</TT
> so that the <SPAN
CLASS="ACRONYM"
>RS-232</SPAN
>
control lines are used correctly for a dumb modem.</P
><P
><TT
CLASS="LITERAL"
>port-owner</TT
>, <TT
CLASS="LITERAL"
>port-group</TT
>
and <TT
CLASS="LITERAL"
>port-mode</TT
> set the serial device to be
accessible only by the <SPAN
CLASS="SYSTEMITEM"
>root</SPAN
> user. Modem applications, which
normally use the <SPAN
CLASS="SYSTEMITEM"
>uucp</SPAN
>
group, cannot now accidentally use the serial console.</P
><P
><TT
CLASS="LITERAL"
>login-prompt</TT
> shows the machine
(<TT
CLASS="LITERAL"
>@</TT
>) and serial port (<TT
CLASS="LITERAL"
>\P</TT
>)
being used. The text <TT
CLASS="LITERAL"
>\040</TT
> is simply the octal
code for a space after <TT
CLASS="LITERAL"
>login:</TT
>.</P
><P
><TT
CLASS="LITERAL"
>term vt102</TT
> gives the make and model of the
terminal most likely to dial in. This sets the
<TT
CLASS="VARNAME"
>TERM</TT
> environment variable, which you can change
if you are dialling in from another terminal type.</P
><P
>The remaining configuration files,
<TT
CLASS="FILENAME"
>/etc/mgetty+sendfax/dialin.config</TT
> and
<TT
CLASS="FILENAME"
>/etc/mgetty+sendfax/login.config</TT
>, do not need
to be altered.</P
><P
>If you wish to alter the suggested configuration then note
that <SPAN
CLASS="APPLICATION"
>mgetty</SPAN
>'s
<TT
CLASS="LITERAL"
>blocking</TT
> and <TT
CLASS="LITERAL"
>toggle-dtr</TT
>
parameters do not co-exist well.</P
><P
>If you have difficulties, activate debugging by adding
<TT
CLASS="LITERAL"
>debug 8</TT
> to <TT
CLASS="FILENAME"
>mgetty.config</TT
>.
<SPAN
CLASS="APPLICATION"
>mgetty</SPAN
>'s actions are then visible in the
file <TT
CLASS="FILENAME"
>/var/log/mgetty.log.ttyS0</TT
>.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="getty-agetty.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="getty-mingetty.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><SPAN
CLASS="PRODUCTNAME"
>agetty</SPAN
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="getty.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><SPAN
CLASS="PRODUCTNAME"
>mingetty</SPAN
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>