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

234 lines
3.5 KiB
HTML

<HTML
><HEAD
><TITLE
>No 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="mingetty"
HREF="getty-mingetty.html"><LINK
REL="NEXT"
TITLE="Configure incidentals"
HREF="misc.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-mingetty.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="misc.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="GETTY-NONE"
></A
>6.6. No <SPAN
CLASS="PRODUCTNAME"
>getty</SPAN
></H1
><P
>If you are using serial console simply to print console
messages then do not run a <SPAN
CLASS="APPLICATION"
>getty</SPAN
> process
on the serial port.</P
><P
><SPAN
CLASS="APPLICATION"
>getty</SPAN
> follows a locking convention
that prevents other serial port applications from using the serial
port. Since we do not want other processes to use the serial port,
but are not running <SPAN
CLASS="APPLICATION"
>getty</SPAN
>, manually
create the lock file.</P
><P
>Create a file <TT
CLASS="FILENAME"
>/var/lock/LCK..ttyS0</TT
> to
contain the text <TT
CLASS="LITERAL"
>1</TT
>. This lets other potential
serial port applications know that process 1 has the serial port in
use. Process 1 is always the <SPAN
CLASS="APPLICATION"
>init</SPAN
>
process, and <SPAN
CLASS="APPLICATION"
>init</SPAN
> is always running, so
the serial port is always locked.</P
><P
>The file is created upon each system boot, as lock files are
often cleared when the system boots. A convenient place to create
the lock file is from <TT
CLASS="FILENAME"
>/etc/rc.serial</TT
>. It
should contain:</P
><DIV
CLASS="FIGURE"
><A
NAME="GETTY-NONE-RCSERIAL"
></A
><P
><B
>Figure 6-11. Contents of <TT
CLASS="FILENAME"
>/etc/rc.serial</TT
> to lock
console serial port when no <SPAN
CLASS="APPLICATION"
>getty</SPAN
>
used</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
># Lock /dev/ttyS0 as it is used by an output-only console
(umask 022 &#38;&#38; \
rm -f '/var/lock/LCK..ttyS0' &#38;&#38; \
echo '1' &#62; '/var/lock/LCK..ttyS0')</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></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-mingetty.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="misc.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><SPAN
CLASS="PRODUCTNAME"
>mingetty</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"
>Configure incidentals</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>