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

396 lines
5.8 KiB
HTML

<HTML
><HEAD
><TITLE
>Traditional getty</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="init system"
HREF="getty-init.html"><LINK
REL="NEXT"
TITLE="agetty"
HREF="getty-agetty.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-init.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-agetty.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="GETTY-GETTY"
></A
>6.2. Traditional <SPAN
CLASS="PRODUCTNAME"
>getty</SPAN
></H1
><P
>Traditional <SPAN
CLASS="APPLICATION"
>getty</SPAN
> implementations
include <SPAN
CLASS="APPLICATION"
>uugetty</SPAN
> and
<SPAN
CLASS="APPLICATION"
>getty_ps</SPAN
>.</P
><P
>The traditional <SPAN
CLASS="APPLICATION"
>getty</SPAN
> is listed in
<TT
CLASS="FILENAME"
>/etc/inittab</TT
> with the name of a section in
<TT
CLASS="FILENAME"
>/etc/gettydefs</TT
> to use for its configuration.
Our example in <A
HREF="getty-init.html#GETTY-INIT-INITTAB"
>Figure 6-3</A
> used the section
<TT
CLASS="LITERAL"
>CON9600</TT
>.</P
><P
>There is no <TT
CLASS="LITERAL"
>CON9600</TT
> in the standard
<TT
CLASS="FILENAME"
>gettydefs</TT
>. This is deliberate, as serial
consoles sometimes require slight tweaking. Copy the
<TT
CLASS="LITERAL"
>DT9600</TT
> entry and use it as your model.</P
><DIV
CLASS="FIGURE"
><A
NAME="GETTY-GETTY-GETTYDEFS"
></A
><P
><B
>Figure 6-4. Define <TT
CLASS="LITERAL"
>CON9600</TT
> in
<TT
CLASS="FILENAME"
>gettydefs</TT
></B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
># Serial console 9600, 8, N, 1, CTS/RTS flow control
CON9600# B9600 CS8 -PARENB -ISTRIP CRTSCTS HUPCL # B9600 SANE CS8 -PARENB -ISTRIP CRTSCTS HUPCL #@S @L login: #CON9600</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><P
>Separate each line with a blank line.</P
><P
>Each configuration line has the syntax:</P
><DIV
CLASS="FIGURE"
><A
NAME="GETTY-GETTY-GETTYDEFS-SYNTAX"
></A
><P
><B
>Figure 6-5. Syntax of entries in <TT
CLASS="FILENAME"
>/etc/gettydefs</TT
>,
in EBNF</B
></P
><P
CLASS="LITERALLAYOUT"
><TT
CLASS="REPLACEABLE"
><I
>&#60;label&#62;</I
></TT
>#&nbsp;<TT
CLASS="REPLACEABLE"
><I
>&#60;initial_flags&#62;</I
></TT
>&nbsp;#&nbsp;<TT
CLASS="REPLACEABLE"
><I
>&#60;final_flags&#62;</I
></TT
>&nbsp;#<TT
CLASS="REPLACEABLE"
><I
>&#60;login_prompt&#62;</I
></TT
>#<TT
CLASS="REPLACEABLE"
><I
>&#60;next_label&#62;</I
></TT
></P
></DIV
><P
>The <TT
CLASS="REPLACEABLE"
><I
>&#60;label&#62;</I
></TT
> is referred to
on the <SPAN
CLASS="APPLICATION"
>getty</SPAN
> command line.</P
><P
>The <TT
CLASS="REPLACEABLE"
><I
>&#60;next_label&#62;</I
></TT
> is the
definition used if a <SPAN
CLASS="ACRONYM"
>RS-232</SPAN
> Break is sent. As
the console is always 9600<SPAN
CLASS="ABBREV"
>bps</SPAN
>, this points back
to the original <TT
CLASS="REPLACEABLE"
><I
>label</I
></TT
>. See <A
HREF="security-sysrq.html"
>Section 9.9</A
> if you ever intend to have more one line
for <TT
CLASS="LITERAL"
>CON9600</TT
> in
<TT
CLASS="FILENAME"
>gettydefs</TT
>.</P
><P
><TT
CLASS="REPLACEABLE"
><I
>&#60;initial_flags&#62;</I
></TT
> are the
serial line parameters used by <SPAN
CLASS="APPLICATION"
>getty</SPAN
>.
These are modeled on the <I
CLASS="CITETITLE"
>stty(1)</I
> and
<I
CLASS="CITETITLE"
>termios(3)</I
> options and the full list varies
depending upon your <SPAN
CLASS="APPLICATION"
>getty</SPAN
> variant. The
parameters in <A
HREF="getty-getty.html#GETTY-GETTY-GETTYDEFS"
>Figure 6-4</A
> ensure that a
line at 9600<SPAN
CLASS="ABBREV"
>bps</SPAN
> with eight data bits and no
parity is configured.</P
><P
><TT
CLASS="REPLACEABLE"
><I
>&#60;final_flags&#62;</I
></TT
> are the serial
line parameters set by <SPAN
CLASS="APPLICATION"
>getty</SPAN
> before it
calls login. You will usually want to set a
9600<SPAN
CLASS="ABBREV"
>bps</SPAN
> line, <TT
CLASS="LITERAL"
>SANE</TT
> terminal
handling, eight data bits, no parity and to hang up the modem when
the login session is finished.</P
><P
>The <TT
CLASS="REPLACEABLE"
><I
>&#60;login_prompt&#62;</I
></TT
> for
serial lines is traditionally the name of the machine, followed by
the serial port, followed by <TT
CLASS="LITERAL"
>login:</TT
> and a space.
The macro that inserts the name of the machine and the serial port
varies, see the documentation for your
<SPAN
CLASS="APPLICATION"
>getty</SPAN
>.</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-init.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-agetty.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><SPAN
CLASS="PRODUCTNAME"
>init</SPAN
> system</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"
>agetty</SPAN
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>