tagged some writeups

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@903 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Larry Lawrence 2003-05-04 17:39:22 +00:00
parent 3fedd093fd
commit 766bbe40fc
5 changed files with 70 additions and 51 deletions

View File

@ -2,8 +2,8 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"/usr/share/docbook/docbookx.dtd" [
<!ENTITY version "20030503">
<!ENTITY releasedate "May 3rd, 2003">
<!ENTITY version "20030504">
<!ENTITY releasedate "May 4th, 2003">
<!ENTITY % book SYSTEM "book/book.ent">
<!ENTITY % preface SYSTEM "preface/preface.ent">

View File

@ -2,13 +2,15 @@
<?dbhtml filename="inputrc.html" dir="postlfs"?>
<title>/etc/inputrc</title>
<para>Inputrc deals with the mapping of the keyboard for certain
situations. This file is the start-up file used by readline - the input
related library used by Bash and most other shells.</para>
<para><filename>inputrc</filename> deals with the mapping of the keyboard for
certain situations. This file is the start-up file used by
<application>readline</application> - the input related library used by
<application>Bash</application> and most other shells.</para>
<para>For more information see <filename>info bash</filename> -- Node:
Readline Init file as well as <filename>info readline</filename>. There
is a lot that can be done with this one rc file.</para>
<para>For more information see <command>info bash</command> -- <emphasis
role="strong">Node: Readline Init</emphasis> file as well as
<command>info readline</command>. There is a lot that can be done with this
one rc file.</para>
<para>The following is a base <filename>/etc/inputrc</filename> along with
comments to explain what the various options do.</para>
@ -16,7 +18,8 @@ comments to explain what the various options do.</para>
<para>Please note that comments can <emphasis>not</emphasis> be on the
same line as commands in <filename>inputrc</filename>.</para>
<para><screen># Begin /etc/inputrc
<screen><userinput><command>cat &gt; /etc/inputrc &lt;&lt; "EOF"</command>
# Begin /etc/inputrc
# Make sure we don't output everything on the 1 line
set horizontal-scroll-mode Off
@ -53,12 +56,13 @@ set bell-style none
"\eOH": beginning-of-line
"\eOF": end-of-line
# End /etc/inputrc</screen></para>
# End /etc/inputrc
<command>EOF</command></userinput></screen>
<para>Global values are set in <filename>/etc/inputrc</filename>.
Personal user values as are set in <filename>~/.inputrc</filename>. The
<filename>~/.inputrc</filename> file will override the global settings
file. The previous page sets up Bash to use
file. The previous page sets up <application>Bash</application> to use
<filename>/etc/inputrc</filename> by default. If you want your system
to use both, it might be a good idea to place a default
<filename>.inputrc</filename> into the <filename>/etc/skel</filename>

View File

@ -2,7 +2,8 @@
<?dbhtml filename="logon.html" dir="postlfs"?>
<title>/etc/issue (Customizing your logon)</title>
<para>When you first boot up your new LFS system, the logon screen will
<para>When you first boot up your new <acronym>LFS</acronym> system, the logon
screen will
be nice and plain (as it should be in a bare-bones system). Many people
however, will want their system to display some information in the logon
message. This can be accomplished using the
@ -12,30 +13,31 @@ file <filename>/etc/issue</filename>.</para>
which will also accept certain Escape sequences (see below) in order to
insert information about the system. There is also the file
<filename>issue.net</filename> which can be used when logging on remotely.
SSH however, will only use it if you set the option in the
<command>ssh</command> however, will only use it if you set the option in the
configuration file and will also <emphasis>not</emphasis> interpret the
escape sequences as shown below.</para>
<para>One of the most common things which people want to do is to clear
the screen at each logon. The easiest way of doing that is to put a
"clear" escape into <filename>/etc/issue</filename>. A simple way of doing this is to do
<userinput>clear &gt; /etc/issue</userinput>. This will insert the
relevant escape code into the start of the
"clear" escape into <filename>/etc/issue</filename>. A simple way of doing
this is to do <userinput><command>clear &gt; /etc/issue</command></userinput>.
This will insert the relevant escape code into the start of the
<filename>/etc/issue</filename> file. Note that if you do this, when
you edit the file, you should leave the ^[c character on the first line
alone.</para>
you edit the file, you should leave the ^[c character on
the first line alone.</para>
<para>The following escapes are recognized by agetty (the program which
usually parses <filename>/etc/issue</filename>). This information is from
<userinput>man agetty</userinput> where you can find extra information
<command>man agetty</command> where you can find extra information
about the logon process.</para>
<para>The <filename>issue</filename> file can contain certain escape codes to display various
information. All escape codes consist of a backslash (\) immediately followed
by one of the letters explained below (so \d in
<filename>/etc/issue</filename> would insert the current date).</para>
<para>The <filename>issue</filename> file can contain certain escape codes to
display various information. All escape codes consist of a backslash
(\) immediately followed by one of the letters explained
below (so \d in <filename>/etc/issue</filename> would
insert the current date).</para>
<para><screen>b Insert the baudrate of the current line.
<screen>b Insert the baudrate of the current line.
d Insert the current date.
s Insert the system name, the name of the operating system.
l Insert the name of the current tty line.
@ -47,7 +49,7 @@ t Insert the current time.
u Insert the number of current users logged in.
U Insert the string "1 user" or "&lt;n&gt; users" where &lt;n&gt; is the
number of current users logged in.
v Insert the version of the OS, e.g. the build-date etc.</screen></para>
v Insert the version of the <acronym>OS</acronym>, e.g. the build-date etc.</screen>
</sect1>

View File

@ -11,13 +11,14 @@ may affect login and interactive environments differently.</para>
<filename>/bin/login</filename> by reading the
<filename>/etc/passwd</filename> file. An
interactive non-login shell is started at the command line (e.g.
[prompt]$<userinput>/bin/bash</userinput>). A non-interactive shell is
usually present when a shell script is running. It is non-interactive
<prompt>[prompt]$</prompt><command>/bin/bash</command>). A non-interactive
shell is usually present when a shell script is running. It is non-interactive
because it is processing a script and not waiting for user input between
commands.</para>
<para>For more information see <filename>info bash</filename> -- Nodes:
Bash Startup Files and Interactive Shells</para>
<para>For more information see <command>info bash</command> --
<emphasis role="strong">Nodes: Bash Startup Files and Interactive
Shells.</emphasis></para>
<para>The following files are needed to make sure that the correct
environment is read for each of the ways the shell can be invoked:
@ -34,11 +35,13 @@ shell.</para>
<para>Here is a base <filename>/etc/profile</filename>. Comments in the
file should explain everything you need. For more information on the
escape sequences you can use for your prompt (e.g. the PS1 environment
variable) see <filename>info bash</filename> -- Node: Printing a
Prompt.</para>
escape sequences you can use for your prompt (e.g. the
<envar>PS1</envar> environment variable) see <command>info
bash</command> -- <emphasis role="strong">Node: Printing a
Prompt.</emphasis></para>
<para><screen># Begin /etc/profile
<screen><userinput><command>cat &gt; /etc/profile &lt;&lt; "EOF"</command>
# Begin /etc/profile
# Written for Beyond Linux From Scratch
# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
@ -97,12 +100,14 @@ fi
export PATH HISTSIZE PS1 LS_COLORS INPUTRC
# End /etc/profile</screen></para>
# End /etc/profile
<command>EOF</command></userinput></screen>
<para>Here is a base <filename>/etc/bashrc</filename>. Comments in the
file should explain everything you need.</para>
<para><screen># Begin /etc/bashrc
<screen><userinput><command>cat &gt; /etc/bashrc &lt;&lt; "EOF"</command>
# Begin /etc/bashrc
# Written for Beyond Linux From Scratch
# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
@ -125,12 +130,14 @@ fi
# /etc/profile.
alias ls='ls --color=auto'
# End /etc/bashrc</screen></para>
# End /etc/bashrc
<command>EOF</command></userinput></screen>
<para>Here is a base <filename>~/.bash_profile</filename>. Comments in
the file should explain everything you need.</para>
<para><screen># Begin ~/.bash_profile
<screen><userinput><command>cat &gt; ~/.bash_profile &lt;&lt; "EOF"</command>
# Begin ~/.bash_profile
# Written for Beyond Linux From Scratch
# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
@ -150,12 +157,14 @@ fi
export PATH
# End ~/.bash_profile</screen></para>
# End ~/.bash_profile
<command>EOF</command></userinput></screen>
<para>Here is a base <filename>~/.bashrc</filename>. Comments in the
file should explain everything you need.</para>
<para><screen># Begin ~/.bashrc
<screen><userinput><command>cat &gt; ~/.bashrc &lt;&lt; "EOF"</command>
# Begin ~/.bashrc
# Written for Beyond Linux From Scratch
# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
@ -170,7 +179,8 @@ if [ -f "/etc/bashrc" ] ; then
source /etc/bashrc
fi
# End ~/.bashrc</screen></para>
# End ~/.bashrc
<command>EOF</command></userinput></screen>
<para>Here is a base <filename>~/.bash_logout</filename>. Comments in
the file should explain everything you need. You will notice that the
@ -178,13 +188,15 @@ base <filename>~/.bash_logout</filename> does not include a
<userinput>clear</userinput> command. This is because the clear is
handled in the <filename>/etc/issue</filename> file.</para>
<para><screen># Begin ~/.bash_logout
<screen><userinput><command>cat &gt; ~/.bash_logout &lt;&lt; "EOF"</command>
# Begin ~/.bash_logout
# Written for Beyond Linux From Scratch
# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
# Personal items to perform on logout.
# End ~/.bash_logout</screen></para>
# End ~/.bash_logout
<command>EOF</command></userinput></screen>
<para>If you want to use the <filename>/etc/dircolors</filename> or
<filename>~/.dircolors</filename> files called from

View File

@ -3,9 +3,10 @@
<title>Random number generation</title>
<para>The Linux kernel supplies a random number generator which is accessed
through <filename>/dev/random</filename> and
<filename>/dev/urandom</filename>. Programs that utilize the random and
urandom devices, such as OpenSSH, will benefit from these instructions.</para>
through <filename class="devicefile">/dev/random</filename> and
<filename class="devicefile">/dev/urandom</filename>. Programs that utilize
the random and urandom devices, such as <application>OpenSSH</application>,
will benefit from these instructions.</para>
<para>When a Linux system starts up without much operator interaction, the
entropy pool, data used to compute a random number, may be in a fairly
@ -15,8 +16,8 @@ you should carry the entropy pool information across your shut-downs and
start-ups. The following init.d script and links will perform this function
for you automatically.</para>
<para><screen><userinput>cat &gt; /etc/rc.d/init.d/random &lt;&lt; "EOF"
</userinput>
<screen><userinput><command>cat &gt; /etc/rc.d/init.d/random &lt;&lt; "EOF"
</command>
#!/bin/sh
# Begin $rc_base/init.d/random
@ -50,19 +51,19 @@ case "$1" in
esac
# End $rc_base/init.d/random
<userinput>EOF
chmod 755 /etc/rc.d/init.d/random</userinput></screen></para>
<command>EOF
chmod 755 /etc/rc.d/init.d/random</command></userinput></screen>
<para>Create the symbolic links to this file in the relevant
<filename class="directory">rc.d</filename> directories
with the following commands:
<screen><userinput>cd /etc/rc.d/init.d &amp;&amp;
<screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
ln -sf ../init.d/random ../rc0.d/K45random &amp;&amp;
ln -sf ../init.d/random ../rc2.d/S25random &amp;&amp;
ln -sf ../init.d/random ../rc3.d/S25random &amp;&amp;
ln -sf ../init.d/random ../rc4.d/S25random &amp;&amp;
ln -sf ../init.d/random ../rc5.d/S25random &amp;&amp;
ln -sf ../init.d/random ../rc6.d/K45random</userinput></screen></para>
ln -sf ../init.d/random ../rc6.d/K45random</command></userinput></screen></para>
</sect1>