Removed excess spaces from the ends of lines in the source files

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4521 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Randy McMurchy 2005-05-30 21:56:30 +00:00
parent f0098014fd
commit e0d33eff5b
10 changed files with 176 additions and 176 deletions

View File

@ -31,9 +31,9 @@
<para>The <application>autofs</application> package contains userspace
tools that work with the kernel to mount and un-mount removable file
systems. This is useful for allowing users to mount floppies, cdroms and
systems. This is useful for allowing users to mount floppies, cdroms and
other removable storage devices without requiring the system
administrator to mount the devices. This may not be ideal for all
administrator to mount the devices. This may not be ideal for all
installations, so be aware of the risks before implementing this feature.</para>
<bridgehead renderas="sect3">Package Information</bridgehead>
@ -120,7 +120,7 @@ Network File Systems
<title>Installation of Autofs</title>
<para>Install <application>autofs</application> by running the following
<para>Install <application>autofs</application> by running the following
commands:</para>
<screen><userinput>patch -Np1 -i ../autofs-4.1.3-strict.patch &amp;&amp;
@ -201,14 +201,14 @@ EOF</userinput></screen>
<filename>fstab</filename> file into that directory.</para>
</note>
<para>While this package could be used to mount NFS shares and SMB
shares, that feature is not configured in these instructions. NFS shares
<para>While this package could be used to mount NFS shares and SMB
shares, that feature is not configured in these instructions. NFS shares
are covered on the next page.</para>
<para>The <filename>auto.misc</filename> must be configured to your
working hardware. The loaded configuration file should load your cdrom
if <filename>/dev/cdrom</filename> is active or it can be edited to
match your device setup and examples for floppies are available in the file
match your device setup and examples for floppies are available in the file
and easily activated. Documentation for this file is available using the
<command>man 5 autofs</command> command.</para>
@ -218,8 +218,8 @@ EOF</userinput></screen>
<title>Boot Script</title>
<para>Install the <filename>/etc/rc.d/init.d/autofs</filename> mount script
and <filename>/etc/sysconfig/autofs.conf</filename> support file included
<para>Install the <filename>/etc/rc.d/init.d/autofs</filename> mount script
and <filename>/etc/sysconfig/autofs.conf</filename> support file included
with the <xref linkend="intro-important-bootscripts"/> package.</para>
<indexterm zone="autofs autofs-init">
@ -231,7 +231,7 @@ EOF</userinput></screen>
<para>The time-out variable is set in
<filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
a default of 60 seconds of inactivity before unmounting the device. A
much shorter time may be necessary to protect buffer writing to a floppy
much shorter time may be necessary to protect buffer writing to a floppy
if users tend to remove the media prior to the timeout setting.</para>
</sect3>
@ -261,7 +261,7 @@ EOF</userinput></screen>
<varlistentry id="automount">
<term><command>automount</command></term>
<listitem>
<para>is the daemon that performs the mounting when a request is
<para>is the daemon that performs the mounting when a request is
made for the device.</para>
<indexterm zone="autofs automount">
<primary sortas="b-automount">automount</primary>

View File

@ -22,8 +22,8 @@
<para>Man and info reader programs can transparently process gzip'ed or
bzip2'ed pages, a feature you can use to free some disk space while keeping
your documentation available. However, things are not that simple; man
directories tend to contain links&mdash;hard and symbolic&mdash;which defeat
simple ideas like recursively calling <command>gzip</command> on them. A
directories tend to contain links&mdash;hard and symbolic&mdash;which defeat
simple ideas like recursively calling <command>gzip</command> on them. A
better way to go is to use the script below.</para>
<screen role="root"><userinput>cat &gt; /usr/sbin/compressdoc &lt;&lt; "EOF"
@ -42,7 +42,7 @@
# compression level, to parse the man.conf for all occurrences of MANPATH,
# to allow for a backup, to allow to keep the newest version of a page.
#
# Modified 20040330 by Tushar Teredesai to replace $0 by the name of the
# Modified 20040330 by Tushar Teredesai to replace $0 by the name of the
# script.
# (Note: It is assumed that the script is in the user's PATH)
#
@ -52,8 +52,8 @@
# TODO:
# - choose a default compress method to be based on the available
# tool : gzip or bzip2;
# - offer an option to automagically choose the best compression
# methed on a per page basis (eg. check which of
# - offer an option to automagically choose the best compression
# methed on a per page basis (eg. check which of
# gzip/bzip2/whatever is the most effective, page per page);
# - when a MANPATH env var exists, use this instead of /etc/man.conf
# (useful for users to (de)compress their man pages;
@ -77,74 +77,74 @@ Where comp_method is one of :
Decompress the man pages.
--backup Specify a .tar backup shall be done for all directories.
In case a backup already exists, it is saved as .tar.old
prior to making the new backup. If a .tar.old backup
In case a backup already exists, it is saved as .tar.old
prior to making the new backup. If a .tar.old backup
exists, it is removed prior to saving the backup.
In backup mode, no other action is performed.
And where options are :
-1 to -9, --fast, --best
The compression level, as accepted by gzip and bzip2.
When not specified, uses the default compression level
for the given method (-6 for gzip, and -9 for bzip2).
The compression level, as accepted by gzip and bzip2.
When not specified, uses the default compression level
for the given method (-6 for gzip, and -9 for bzip2).
Not used when in backup or decompress modes.
--force, -F Force (re-)compression, even if the previous one was
the same method. Useful when changing the compression
ratio. By default, a page will not be re-compressed if
it ends with the same suffix as the method adds
--force, -F Force (re-)compression, even if the previous one was
the same method. Useful when changing the compression
ratio. By default, a page will not be re-compressed if
it ends with the same suffix as the method adds
(.bz2 for bzip2, .gz for gzip).
--soft, -S Change hard-links into soft-links. Use with _caution_
as the first encountered file will be used as a
--soft, -S Change hard-links into soft-links. Use with _caution_
as the first encountered file will be used as a
reference. Not used when in backup mode.
--hard, -H Change soft-links into hard-links. Not used when in
--hard, -H Change soft-links into hard-links. Not used when in
backup mode.
--conf=dir, --conf dir
Specify the location of man.conf. Defaults to /etc.
--verbose, -v Verbose mode, print the name of the directory being
processed. Double the flag to turn it even more verbose,
--verbose, -v Verbose mode, print the name of the directory being
processed. Double the flag to turn it even more verbose,
and to print the name of the file being processed.
--fake, -f Fakes it. Print the actual parameters compman will use.
dirs A list of space-separated _absolute_ pathnames to the
man directories. When empty, and only then, parse
dirs A list of space-separated _absolute_ pathnames to the
man directories. When empty, and only then, parse
${MAN_CONF}/man.conf for all occurrences of MANPATH.
Note about compression:
There has been a discussion on blfs-support about compression ratios of
both gzip and bzip2 on man pages, taking into account the hosting fs,
the architecture, etc... On the overall, the conclusion was that gzip
was much more efficient on 'small' files, and bzip2 on 'big' files,
was much more efficient on 'small' files, and bzip2 on 'big' files,
small and big being very dependent on the content of the files.
See the original post from Mickael A. Peters, titled
See the original post from Mickael A. Peters, titled
"Bootable Utility CD", dated 20030409.1816(+0200), and subsequent posts:
http://linuxfromscratch.org/pipermail/blfs-support/2003-April/038817.html
On my system (x86, ext3), man pages were 35564KB before compression.
gzip -9 compressed them down to 20372KB (57.28%), bzip2 -9 got down to
On my system (x86, ext3), man pages were 35564KB before compression.
gzip -9 compressed them down to 20372KB (57.28%), bzip2 -9 got down to
19812KB (55.71%). That is a 1.57% gain in space. YMMV.
What was not taken into consideration was the decompression speed. But
does it make sense to? You gain fast access with uncompressed man
pages, or you gain space at the expense of a slight overhead in time.
What was not taken into consideration was the decompression speed. But
does it make sense to? You gain fast access with uncompressed man
pages, or you gain space at the expense of a slight overhead in time.
Well, my P4-2.5GHz does not even let me notice this... :-)
EOT
) | less
}
# This function checks that the man page is unique amongst bzip2'd,
# This function checks that the man page is unique amongst bzip2'd,
# gzip'd and uncompressed versions.
# $1 the directory in which the file resides
# $2 the file name for the man page
# Returns 0 (true) if the file is the latest and must be taken care of,
# and 1 (false) if the file is not the latest (and has therefore been
# Returns 0 (true) if the file is the latest and must be taken care of,
# and 1 (false) if the file is not the latest (and has therefore been
# deleted).
function check_unique ()
{
@ -176,9 +176,9 @@ function check_unique ()
# Name of the script
MY_NAME=`basename $0`
# OK, parse the command-line for arguments, and initialize to some
# sensible state, that is: don't change links state, parse
# /etc/man.conf, be most silent, search man.conf in /etc, and don't
# OK, parse the command-line for arguments, and initialize to some
# sensible state, that is: don't change links state, parse
# /etc/man.conf, be most silent, search man.conf in /etc, and don't
# force (re-)compression.
COMP_METHOD=
COMP_SUF=
@ -257,7 +257,7 @@ while [ -n "$1" ]; do
exit 1
;;
*)
echo "\"$1\" is not an absolute path name"
echo "\"$1\" is not an absolute path name"
exit 1
;;
esac
@ -285,7 +285,7 @@ case $VERBOSE_LVL in
;;
esac
# Note: on my machine, 'man --path' gives /usr/share/man twice, once
# Note: on my machine, 'man --path' gives /usr/share/man twice, once
# with a trailing '/', once without.
if [ -z "$MAN_DIR" ]; then
MAN_DIR=`man --path -C "$MAN_CONF"/man.conf \
@ -318,10 +318,10 @@ if [ "$FAKE" != "no" ]; then
[ "foo$FORCE_OPT" = "foo-F" ] &amp;&amp; echo "yes" || echo "no"
echo "man.conf is.......: ${MAN_CONF}/man.conf"
echo -n "Hard-links........: "
[ "foo$LN_OPT" = "foo-S" ] &amp;&amp;
[ "foo$LN_OPT" = "foo-S" ] &amp;&amp;
echo "convert to soft-links" || echo "leave as is"
echo -n "Soft-links........: "
[ "foo$LN_OPT" = "foo-H" ] &amp;&amp;
[ "foo$LN_OPT" = "foo-H" ] &amp;&amp;
echo "convert to hard-links" || echo "leave as is"
echo "Backup............: $BACKUP"
echo "Faking (yes!).....: $FAKE"
@ -343,7 +343,7 @@ if [ "$BACKUP" = "yes" ]; then
DIR_NAME=`basename "${DIR}"`
echo "Backing up $DIR..." &gt; $DEST_FD0
[ -f "${DIR_NAME}.tar.old" ] &amp;&amp; rm -f "${DIR_NAME}.tar.old"
[ -f "${DIR_NAME}.tar" ] &amp;&amp;
[ -f "${DIR_NAME}.tar" ] &amp;&amp;
mv "${DIR_NAME}.tar" "${DIR_NAME}.tar.old"
tar -cfv "${DIR_NAME}.tar" "${DIR_NAME}" &gt; $DEST_FD1
done
@ -360,9 +360,9 @@ for DIR in $MAN_DIR; do
if [ "foo$FILE" = "foo*" ]; then continue; fi
# Fixes the case when hard-links see their compression scheme change
# (from not compressed to compressed, or from bz2 to gz, or from gz
# (from not compressed to compressed, or from bz2 to gz, or from gz
# to bz2)
# Also fixes the case when multiple version of the page are present,
# Also fixes the case when multiple version of the page are present,
# which are either compressed or not.
if [ ! -L "$FILE" -a ! -e "$FILE" ]; then continue; fi
@ -370,7 +370,7 @@ for DIR in $MAN_DIR; do
if [ "$FILE" = "whatis" ]; then continue; fi
if [ -d "$FILE" ]; then
cd "${MEM_DIR}" # Go back to where we ran "$0",
cd "${MEM_DIR}" # Go back to where we ran "$0",
# in case "$0"=="./compressdoc" ...
# We are going recursive to that directory
echo "-&gt; Entering ${DIR}/${FILE}..." &gt; $DEST_FD0
@ -425,8 +425,8 @@ for DIR in $MAN_DIR; do
elif [ -f "$FILE" ]; then
# Take care of hard-links: build the list of files hard-linked
# to the one we are {de,}compressing.
# NB. This is not optimum has the file will eventually be
# compressed as many times it has hard-links. But for now,
# NB. This is not optimum has the file will eventually be
# compressed as many times it has hard-links. But for now,
# that's the safe way.
inode=`ls -li "$FILE" | awk '{print $1}'`
HLINKS=`find . \! -name "$FILE" -inum $inode`
@ -482,7 +482,7 @@ for DIR in $MAN_DIR; do
fi
else
# There is a problem when we get neither a symlink nor a plain
# There is a problem when we get neither a symlink nor a plain
# file. Obviously, we shall never ever come here... :-(
echo -n "Whaooo... \"${DIR}/${FILE}\" is neither a symlink "
echo "nor a plain file. Please check:"
@ -496,16 +496,16 @@ done # for DIR</literal>
EOF
chmod 755 /usr/sbin/compressdoc</userinput></screen>
<para>Now, as <systemitem class="username">root</systemitem>, you can issue a
<command>compressdoc --bz2</command> to compress all your system man
pages. You can also run <command>compressdoc --help</command> to get
<para>Now, as <systemitem class="username">root</systemitem>, you can issue a
<command>compressdoc --bz2</command> to compress all your system man
pages. You can also run <command>compressdoc --help</command> to get
comprehensive help about what the script is able to do.</para>
<para> Don't forget that a few programs, like the <application>X Window
System</application> and <application>XEmacs</application> also
install their documentation in non standard places (such as
<filename class="directory">/usr/X11R6/man</filename>, etc...). Be sure
to add these locations to the file <filename>/etc/man.conf</filename>, as a
<para> Don't forget that a few programs, like the <application>X Window
System</application> and <application>XEmacs</application> also
install their documentation in non standard places (such as
<filename class="directory">/usr/X11R6/man</filename>, etc...). Be sure
to add these locations to the file <filename>/etc/man.conf</filename>, as a
<envar>MANPATH</envar>=<replaceable>[/path]</replaceable> section.</para>
<para> Example:</para>
@ -517,10 +517,10 @@ chmod 755 /usr/sbin/compressdoc</userinput></screen>
MANPATH=/opt/qt/doc/man
...</literal></screen>
<para>Generally, package installation systems do not compress man/info pages,
which means you will need to run the script again if you want to keep the size
<para>Generally, package installation systems do not compress man/info pages,
which means you will need to run the script again if you want to keep the size
of your documentation as small as possible. Also, note that running the script
after upgrading a package is safe; when you have several versions of a page
after upgrading a package is safe; when you have several versions of a page
(for example, one compressed and one uncompressed), the most recent one is kept
and the others deleted.</para>

View File

@ -10,31 +10,31 @@
<title>After LFS Configuration Issues</title>
<para>The intention of LFS is to provide a basic system which you can
build upon. There are several things, about tidying up the system, which
<para>The intention of LFS is to provide a basic system which you can
build upon. There are several things, about tidying up the system, which
many people wonder about once they have done the base install.
We hope to cover these issues in this chapter.</para>
<para>Most people coming from non-Unix like backgrounds to Linux find the
concept of text-only configuration files slightly strange. In Linux, just
about all configuration is done via text files. The majority of these files
can be found in the <filename>/etc</filename> hierarchy. There are often
graphical configuration programs available for different subsystems but most
are simply pretty front ends to the process of editing the file. The advantage
of text-only configuration is that you can edit parameters using your favorite
text editor, whether that be <command>vim</command>,
concept of text-only configuration files slightly strange. In Linux, just
about all configuration is done via text files. The majority of these files
can be found in the <filename>/etc</filename> hierarchy. There are often
graphical configuration programs available for different subsystems but most
are simply pretty front ends to the process of editing the file. The advantage
of text-only configuration is that you can edit parameters using your favorite
text editor, whether that be <command>vim</command>,
<command>emacs</command>, or anything else.</para>
<para>The first task is making a recovery diskette because it's the most
critical need. Then the system is configured to ease addition of
new users, in <xref linkend="postlfs-config-bootdisk"/>, because this
can affect the choices you make in the two subsequent topics&mdash;<xref
can affect the choices you make in the two subsequent topics&mdash;<xref
linkend="postlfs-config-profile"/> and <xref linkend="postlfs-config-vimrc"/>.</para>
<para> The remaining topics, <xref linkend="postlfs-config-logon"/>,
<xref linkend="postlfs-config-shells"/>, <xref linkend="postlfs-config-random"/>,
<xref linkend="compressdoc"/>, <xref linkend="autofs"/>, and
<xref linkend="postlfs-config-netfs"/> are then addressed, in that order. They
<para> The remaining topics, <xref linkend="postlfs-config-logon"/>,
<xref linkend="postlfs-config-shells"/>, <xref linkend="postlfs-config-random"/>,
<xref linkend="compressdoc"/>, <xref linkend="autofs"/>, and
<xref linkend="postlfs-config-netfs"/> are then addressed, in that order. They
don't have much interaction with the other topics in this chapter.</para>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootdisk.xml"/>

View File

@ -19,7 +19,7 @@
<primary sortas="e-etc-shells">/etc/shells</primary>
</indexterm>
<para>The <filename>shells</filename> file contains a list of
<para>The <filename>shells</filename> file contains a list of
login shells on the system. Applications use this file to determine
whether a shell is valid. For each shell a single line should be
present, consisting of the shell's path, relative to root.</para>
@ -30,9 +30,9 @@
change.</para>
<para>It is a requirement for applications such as
<application>GDM</application> which does not populate the
face browser if it can't find <filename>/etc/shells</filename> or
FTP daemons which traditionally disallow access to users
<application>GDM</application> which does not populate the
face browser if it can't find <filename>/etc/shells</filename> or
FTP daemons which traditionally disallow access to users
with shells not included in this file.</para>
<screen role="root"><userinput>cat &gt; /etc/shells &lt;&lt; "EOF"

View File

@ -23,14 +23,14 @@
<primary sortas="e-AA.inputrc">~/.inputrc</primary>
</indexterm>
<para><filename>/etc/inputrc</filename> deals with the mapping of the
<para><filename>/etc/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>readline</application>, the input related library used by
<application>bash</application> and most other shells.</para>
<para>For more information see <command>info bash</command>&mdash;<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
<command>info readline</command>. There is a lot that can be done with this
one rc file.</para>
<para>Global values are set in <filename>/etc/inputrc</filename>.
@ -41,7 +41,7 @@
for a user when <filename>/etc/profile</filename> is read (usually at login).
If you want your system to use both, or don't want <emphasis>global</emphasis>
keyboard handling, it is a good idea to place a default
<filename>.inputrc</filename> into the <filename
<filename>.inputrc</filename> into the <filename
class="directory">/etc/skel</filename> directory for use with new users.</para>
<para>Below is a base <filename>/etc/inputrc</filename> along with
@ -49,14 +49,14 @@
can <emphasis>not</emphasis> be on the same line as commands.</para>
<para>If you will create an <filename>.inputrc</filename> in
<filename class="directory">/etc/skel</filename> using the command below,
change the command's output to <filename>/etc/skel/.inputrc</filename> and
<filename class="directory">/etc/skel</filename> using the command below,
change the command's output to <filename>/etc/skel/.inputrc</filename> and
be sure to check/set permissions afterward. Then you can just copy that
file to <filename>/etc/inputrc</filename> and the home directory
of any user already existing in the system, including <systemitem
of any user already existing in the system, including <systemitem
class="username">root</systemitem>, that needs
a private version of the file. Be sure to use the <option>-p</option>
parameter of <command>cp</command> to maintain permissions and be sure to
parameter of <command>cp</command> to maintain permissions and be sure to
change owner and group appropriately.</para>
<screen role="root"><userinput>cat &gt; /etc/inputrc &lt;&lt; "EOF"
@ -66,7 +66,7 @@
set horizontal-scroll-mode Off
# Enable 8bit input
set meta-flag On
set meta-flag On
set input-meta On
# Turns off 8th bit stripping
@ -78,8 +78,8 @@ set output-meta On
# none, visible or audible
set bell-style none
# All of the following map the escape sequence of the
# value contained inside the 1st argument to the
# All of the following map the escape sequence of the
# value contained inside the 1st argument to the
# readline specific functions
"\eOd": backward-word

View File

@ -19,37 +19,37 @@
<primary sortas="e-etc-issue">/etc/issue</primary>
</indexterm>
<para>When you first boot up your new LFS 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
<para>When you first boot up your new LFS 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
file <filename>/etc/issue</filename>.</para>
<para>The <filename>/etc/issue</filename> file is a plain text file
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.
<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
<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 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-sequence into <filename>/etc/issue</filename>. A simple way of
the screen at each logon. The easiest way of doing that is to put a "clear"
escape-sequence into <filename>/etc/issue</filename>. A simple way of
doing this is to do <command>clear &gt; /etc/issue</command>.
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
<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>
<para>The following escapes are recognized by <command>agetty</command>
(the program which usually parses <filename>/etc/issue</filename>). This
information is from <command>man agetty</command> where you can find
(the program which usually parses <filename>/etc/issue</filename>). This
information is from <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
<option>\d</option> in <filename>/etc/issue</filename> would
<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
<option>\d</option> in <filename>/etc/issue</filename> would
insert the current date).</para>
<screen><literal>b Insert the baudrate of the current line.

View File

@ -20,17 +20,17 @@
<primary sortas="f-netfs">netfs</primary>
</indexterm>
<para>While LFS is capable of mounting network file systems such as NFS,
these are not mounted by the <filename>mountfs</filename> init script.
Network file systems must be mounted after the networking is activated and
<para>While LFS is capable of mounting network file systems such as NFS,
these are not mounted by the <filename>mountfs</filename> init script.
Network file systems must be mounted after the networking is activated and
unmounted before the network goes down. The <filename>netfs</filename>
bootscript was written to handle both boot-time mounting of network
filesystems, if the entry in <filename>/etc/fstab</filename> contains the
<option>_netdev</option> option, and unmounting of all network filesystems
bootscript was written to handle both boot-time mounting of network
filesystems, if the entry in <filename>/etc/fstab</filename> contains the
<option>_netdev</option> option, and unmounting of all network filesystems
before the network is brought down.</para>
<para>As the <systemitem class="username">root</systemitem> user, install
the <filename>/etc/rc.d/init.d/netfs</filename> bootscript included with the
<para>As the <systemitem class="username">root</systemitem> user, install
the <filename>/etc/rc.d/init.d/netfs</filename> bootscript included with the
<xref linkend="intro-important-bootscripts"/> package.</para>
<screen role='root'><userinput>make install-netfs</userinput></screen>

View File

@ -20,9 +20,9 @@
</indexterm>
<para>The Linux kernel supplies a random number generator which is accessed
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>,
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
@ -32,7 +32,7 @@
you should carry the entropy pool information across your shut-downs and
start-ups.</para>
<para>Install the <filename>/etc/rc.d/init.d/random</filename> init script
<para>Install the <filename>/etc/rc.d/init.d/random</filename> init script
included with the <xref linkend="intro-important-bootscripts"/> package.</para>
<screen role="root"><userinput>make install-random</userinput></screen>

View File

@ -24,14 +24,14 @@
</indexterm>
<para>Together, the <command>/usr/sbin/useradd</command> command and
<filename class="directory">/etc/skel</filename> directory (both are easy to
setup and use) provide a way to assure new users are added on your LFS
system with the same beginning settings for things like <envar>PATH</envar>,
keyboard processing and environmental variables. Using these two facilities
<filename class="directory">/etc/skel</filename> directory (both are easy to
setup and use) provide a way to assure new users are added on your LFS
system with the same beginning settings for things like <envar>PATH</envar>,
keyboard processing and environmental variables. Using these two facilities
makes it easier to assure this initial state for each new user.</para>
<para>The <filename class="directory">/etc/skel</filename> directory holds
copies of various initialization and other files that may be copied to the
<para>The <filename class="directory">/etc/skel</filename> directory holds
copies of various initialization and other files that may be copied to the
new user's home directory when the <command>/usr/sbin/useradd</command>
program adds the new user.</para>
@ -40,11 +40,11 @@
<para>The <command>useradd</command> program uses a collection of
default values kept in <filename>/etc/default/useradd</filename>,
if it exists. If the file does not exist, then it uses some internal
defaults. You can see the default values by running
defaults. You can see the default values by running
<command>/usr/sbin/useradd -D</command>.</para>
<para>To change these values to something new, create a base <filename>
/etc/default/useradd</filename> file with the same values as the output of
/etc/default/useradd</filename> file with the same values as the output of
<command>/usr/sbin/useradd -D</command>. Here is a sample.</para>
<screen><literal># Begin /etc/default/useradd
@ -63,7 +63,7 @@ SKEL=/etc/skel
<screen role="root"><userinput>/usr/sbin/useradd -D -s/bin/bash</userinput></screen>
<para>This will set the <envar>SHELL</envar>= line to
<para>This will set the <envar>SHELL</envar>= line to
<envar>SHELL</envar>=/bin/bash.</para>
<para><command>Useradd</command> has many parameters that
@ -73,28 +73,28 @@ SKEL=/etc/skel
<bridgehead renderas="sect5">/etc/skel</bridgehead>
<para>To get started, create an <filename
class="directory">/etc/skel</filename> directory and make sure it is
writable only by the system administrator, usually <systemitem
class="username">root</systemitem>. Creating the
directory as <systemitem class="username">root</systemitem> is
<para>To get started, create an <filename
class="directory">/etc/skel</filename> directory and make sure it is
writable only by the system administrator, usually <systemitem
class="username">root</systemitem>. Creating the
directory as <systemitem class="username">root</systemitem> is
the best way to go.</para>
<para>The mode of any files from this part of the book that you put in
<filename class="directory">/etc/skel</filename> should be writable only by
the owner. Also, since there is no telling what kind of sensitive information
<filename class="directory">/etc/skel</filename> should be writable only by
the owner. Also, since there is no telling what kind of sensitive information
a user may eventually place in their copy of these files, you should
make them unreadable by "group" and "other".</para>
<para>You can also put other files in
<para>You can also put other files in
<filename class="directory">/etc/skel</filename> and
different permissions may be needed for them.</para>
<para>Decide which initialization files should be provided in every (or most)
new user's home directory. The decisions you make will affect what you
do in the next two sections, <xref linkend="postlfs-config-profile"/> and
do in the next two sections, <xref linkend="postlfs-config-profile"/> and
<xref linkend="postlfs-config-vimrc"/>. Some or all of those files will be
useful for <systemitem class="username">root</systemitem>, any
useful for <systemitem class="username">root</systemitem>, any
already-existing users, and new users.</para>
<para>The files from those sections that you might want to place in
@ -107,16 +107,16 @@ SKEL=/etc/skel
and then make your decision.</para>
<para>You will run a slightly modified set of commands for files which
are placed in <filename class="directory">/etc/skel</filename>. Each section
will remind you of this. In brief, the book's commands have been written for
files <emphasis>not</emphasis> added to
<filename class="directory">/etc/skel</filename> and just send the results to
the user's home directory. If the file is going to be in
<filename class="directory">/etc/skel</filename>, change the book's command(s)
are placed in <filename class="directory">/etc/skel</filename>. Each section
will remind you of this. In brief, the book's commands have been written for
files <emphasis>not</emphasis> added to
<filename class="directory">/etc/skel</filename> and just send the results to
the user's home directory. If the file is going to be in
<filename class="directory">/etc/skel</filename>, change the book's command(s)
to send output there instead and then just copy the file from
<filename class="directory">/etc/skel</filename> to the appropriate
directories, like <filename class="directory">/etc</filename>,
<filename class="directory">~</filename> or the home directory
<filename class="directory">/etc/skel</filename> to the appropriate
directories, like <filename class="directory">/etc</filename>,
<filename class="directory">~</filename> or the home directory
of any other user already in the system.</para>
<bridgehead renderas="sect5">When Adding a User</bridgehead>
@ -124,7 +124,7 @@ SKEL=/etc/skel
<para>When adding a new user with <command>useradd</command>, use
the <option>-m</option> parameter, which tells
<command>useradd</command> to create the user's home directory and
copy files from <filename class="directory">/etc/skel</filename> (can be
copy files from <filename class="directory">/etc/skel</filename> (can be
overridden) to the new user's home directory. For example:</para>
<screen role="root"><userinput>useradd -m <replaceable>[newuser]</replaceable></userinput></screen>

View File

@ -32,21 +32,21 @@
least one flame war, usually involving <application>Vim</application> and
<application>Emacs</application> users!</para>
<para>The LFS book gives a basic <filename>vimrc</filename> file. Here, we
attempt to enhance this file. At startup, <command>vim</command> reads
<filename>/etc/vimrc</filename> and <filename>~/.vimrc</filename> (i.e., the
<para>The LFS book gives a basic <filename>vimrc</filename> file. Here, we
attempt to enhance this file. At startup, <command>vim</command> reads
<filename>/etc/vimrc</filename> and <filename>~/.vimrc</filename> (i.e., the
global <filename>vimrc</filename> and the user-specific one.). Note that this is
only true if you compiled <application>vim</application> using LFS-3.1 onwards.
Prior to this, the global <filename>vimrc</filename> was
Prior to this, the global <filename>vimrc</filename> was
<filename>/usr/share/vim/vimrc</filename>.</para>
<para>Here is a slightly expanded <filename>.vimrc</filename> that you can
put in <filename>~/.vimrc</filename> to provide user specific effects. Of
course, if you put it into <filename>/etc/skel/.vimrc</filename> instead, it
<para>Here is a slightly expanded <filename>.vimrc</filename> that you can
put in <filename>~/.vimrc</filename> to provide user specific effects. Of
course, if you put it into <filename>/etc/skel/.vimrc</filename> instead, it
will be made available to users you add to the system later. You can also copy
the file from <filename>/etc/skel/.vimrc</filename> to the home directory of
users already on the system, like root. Be sure to set permissions, owner, and
group if you do copy anything directly from
the file from <filename>/etc/skel/.vimrc</filename> to the home directory of
users already on the system, like root. Be sure to set permissions, owner, and
group if you do copy anything directly from
<filename class="directory">/etc/skel</filename>.</para>
<screen><literal>" Begin .vimrc
@ -57,16 +57,16 @@ set ruler
" End .vimrc</literal></screen>
<para>A FAQ on the LFS mailing lists regards the comment tags in
<filename>vimrc</filename>. Note that they are " instead of the more
usual # or //. This is correct, the syntax for
<para>A FAQ on the LFS mailing lists regards the comment tags in
<filename>vimrc</filename>. Note that they are " instead of the more
usual # or //. This is correct, the syntax for
<filename>vimrc</filename> is slightly unusual.</para>
<para>We'll run through a quick explanation of what each of the
options in this example file means here:</para>
<itemizedlist>
<!--
<!--
<listitem>
<para><option>set nocompatible</option> : This option
stops <command>vim</command> from behaving in a strongly <command>vi
@ -75,27 +75,27 @@ set ruler
override.</para>
</listitem>
<listitem>
<para><option>set bs=2</option>: This influences the behavior
<para><option>set bs=2</option>: This influences the behavior
of the backspace option. It is fairly complex so see <command>:help 'bs'
</command> for more details.</para>
</listitem>
-->
<listitem>
<para><option>set columns=80</option>: This simply sets the
<para><option>set columns=80</option>: This simply sets the
number of columns used on the screen.</para>
</listitem>
<!--
<!--
<listitem>
<para><option>set background=dark</option>: This tells
<command>vim</command> to use colors which look good on a dark
<command>vim</command> to use colors which look good on a dark
background.</para>
</listitem>
-->
<listitem>
<para><option>set wrapmargin=8</option>: This is the number of
<para><option>set wrapmargin=8</option>: This is the number of
characters from the right window border where wrapping starts.</para>
</listitem>
<!--
<!--
<listitem>
<para><option>syntax on</option>: Enables
<command>vim</command>'s syntax highlighting.</para>
@ -108,11 +108,11 @@ set ruler
</itemizedlist>
<para>More information on the <emphasis>many</emphasis>
<command>vim</command> options can be found by reading the help
inside <command>vim</command> itself. Do this by typing
<command>:</command><option>help</option> in
<command>vim</command> to get the general help, or by typing
<command>:</command><option>help usr_toc.txt</option> to view
<command>vim</command> options can be found by reading the help
inside <command>vim</command> itself. Do this by typing
<command>:</command><option>help</option> in
<command>vim</command> to get the general help, or by typing
<command>:</command><option>help usr_toc.txt</option> to view
the User Manual Table of Contents.</para>
</sect1>