mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-03 06:27:16 +08:00
Indexed configuration files and bootscripts in the 'After LFS Configuration Issues' section
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3283 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
a3045a11f5
commit
0290a02365
2
Makefile
2
Makefile
@ -62,7 +62,7 @@ print:
|
||||
xsltproc --xinclude --nonet --output blfs-print.fo \
|
||||
stylesheets/blfs-print.xsl index.xml
|
||||
sed -i -e "s/inherit/all/" blfs-print.fo
|
||||
/opt/fop/fop.sh blfs-print.fo blfs-print.pdf
|
||||
fop.sh blfs-print.fo blfs-print.pdf
|
||||
$(INSTALL) -d $(BASEDIR)print
|
||||
rm blfs-print.fo
|
||||
mv blfs-print.pdf $(BASEDIR)print
|
||||
|
@ -4,10 +4,6 @@
|
||||
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
||||
%general-entities;
|
||||
|
||||
<!-- Place this in the general.ent file
|
||||
<!ENTITY template-version "">
|
||||
-->
|
||||
|
||||
<!ENTITY autofs-download-http "http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-&autofs-version;.tar.bz2">
|
||||
<!ENTITY autofs-download-ftp "ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-&autofs-version;.tar.bz2">
|
||||
<!ENTITY autofs-md5sum "f43a09e94c4bd512ec58ac06e9d42c60">
|
||||
@ -23,6 +19,8 @@
|
||||
</sect1info>
|
||||
<?dbhtml filename="autofs.html"?>
|
||||
<title>Automate Mounting of Removable File Systems</title>
|
||||
<indexterm zone="autofs">
|
||||
<primary sortas="a-Autofs">Autofs</primary></indexterm>
|
||||
|
||||
<sect2>
|
||||
<title>Introduction to <application>autofs</application></title>
|
||||
@ -36,12 +34,16 @@ installations, so be aware of the risks before implementing this feature.</para>
|
||||
|
||||
<sect3><title>Package information</title>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem><para>Download (HTTP): <ulink url="&autofs-download-http;"/></para></listitem>
|
||||
<listitem><para>Download (FTP): <ulink url="&autofs-download-ftp;"/></para></listitem>
|
||||
<listitem><para>Download (HTTP):
|
||||
<ulink url="&autofs-download-http;"/></para></listitem>
|
||||
<listitem><para>Download (FTP):
|
||||
<ulink url="&autofs-download-ftp;"/></para></listitem>
|
||||
<listitem><para>Download MD5 sum: &autofs-md5sum;</para></listitem>
|
||||
<listitem><para>Download size: &autofs-size;</para></listitem>
|
||||
<listitem><para>Estimated disk space required: &autofs-buildsize;</para></listitem>
|
||||
<listitem><para>Estimated build time: &autofs-time;</para></listitem></itemizedlist>
|
||||
<listitem><para>Estimated disk space required:
|
||||
&autofs-buildsize;</para></listitem>
|
||||
<listitem><para>Estimated build time:
|
||||
&autofs-time;</para></listitem></itemizedlist>
|
||||
</sect3>
|
||||
|
||||
<!-- <sect3><title>Additional downloads</title>
|
||||
@ -66,9 +68,6 @@ url="&patch-root;/template-&template-version;-patch_name-patch_version.patch"/><
|
||||
<sect2>
|
||||
<title>Installation of <application>autofs</application></title>
|
||||
|
||||
<para>Install <application>autofs</application> by running the following
|
||||
commands:</para>
|
||||
|
||||
<para>Verify that kernel support has been compiled in or built as
|
||||
modules in the following areas:
|
||||
<screen>File systems
|
||||
@ -78,6 +77,9 @@ Network File Systems
|
||||
SMB file system support Y or M</screen>
|
||||
Recompile and install the new kernel, if necessary.</para>
|
||||
|
||||
<para>Install <application>autofs</application> by running the following
|
||||
commands:</para>
|
||||
|
||||
<screen><userinput><command>./configure --prefix=/ --mandir=/usr/share/man &&
|
||||
make &&
|
||||
make install &&
|
||||
@ -96,11 +98,21 @@ removes the installed script which only works on specific distributions.</para>
|
||||
<sect2>
|
||||
<title>Configuring <application>autofs</application></title>
|
||||
|
||||
<sect3><title>Config files</title>
|
||||
<sect3 id="autofs-config"><title>Config files</title>
|
||||
<para><filename>/etc/sysconfig/autofs.conf</filename>,
|
||||
<filename>/etc/auto.master</filename>,
|
||||
<filename>/etc/auto.misc</filename>, and
|
||||
<filename>/etc/auto.net</filename></para>
|
||||
<indexterm zone="autofs autofs-config" >
|
||||
<primary
|
||||
sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
|
||||
</indexterm>
|
||||
<indexterm zone="autofs autofs-config">
|
||||
<primary sortas="e-etc-auto.master">/etc/auto.master</primary></indexterm>
|
||||
<indexterm zone="autofs autofs-config">
|
||||
<primary sortas="e-etc-auto.misc">/etc/auto.misc</primary></indexterm>
|
||||
<indexterm zone="autofs autofs-config">
|
||||
<primary sortas="e-etc-auto.net">/etc/auto.net</primary></indexterm>
|
||||
</sect3>
|
||||
|
||||
<sect3><title>Configuration Information</title>
|
||||
@ -136,10 +148,13 @@ 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>
|
||||
|
||||
<para>Install the <filename>/etc/rc.d/init.d/autofs</filename> mount
|
||||
script and <filename>/etc/sysconfig/autofs.conf</filename> support file
|
||||
<para id="autofs-init">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">
|
||||
<primary sortas="f-autofs-init">autofs</primary></indexterm>
|
||||
|
||||
<screen><userinput><command>make install-autofs</command></userinput></screen>
|
||||
|
||||
@ -156,17 +171,28 @@ setting.</para>
|
||||
<sect2>
|
||||
<title>Contents</title>
|
||||
|
||||
<para>The <application>autofs</application> package contains
|
||||
<command>automount</command> and <filename>autofs</filename> library
|
||||
modules.</para>
|
||||
<segmentedlist>
|
||||
<segtitle>Installed Program</segtitle>
|
||||
<segtitle>Installed Libraries</segtitle>
|
||||
<seglistitem>
|
||||
<seg>automount</seg>
|
||||
<seg>autofs modules</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
<variablelist>
|
||||
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
||||
<?dbfo list-presentation="list"?>
|
||||
|
||||
<sect2><title>Description</title>
|
||||
|
||||
<sect3><title>automount</title>
|
||||
<para><command>automount</command> is the daemon that performs the
|
||||
mounting when a request is made for the device.</para></sect3>
|
||||
<varlistentry id="automount">
|
||||
<term><command>automount</command></term>
|
||||
<listitem><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></indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="postlfs-config-bootdisk">
|
||||
<sect1 id="postlfs-config-bootdisk" xreflabel="Creating a Custom Book Disk">
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
|
@ -5,7 +5,7 @@
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="compressdoc" xreflabel="compressdoc">
|
||||
<sect1 id="compressdoc" xreflabel="Compressing man and info pages">
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
|
@ -5,7 +5,7 @@
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<chapter id="postlfs-config">
|
||||
<chapter id="postlfs-config" xreflabel="After LFS Configuration Issues">
|
||||
<?dbhtml filename="config.html"?>
|
||||
<title>After <acronym>LFS</acronym> Configuration Issues</title>
|
||||
|
||||
@ -22,21 +22,20 @@ 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 vim, emacs or anything else.</para>
|
||||
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 "Configuring for Adding Users", because this
|
||||
can affect the choices you make in the two subsequent topics -
|
||||
"The Bash Shell Startup Files" and
|
||||
"/etc/vimrc, ~/.vimrc".
|
||||
</para>
|
||||
"The Bash Shell Startup Files" and "The /etc/vimrc and ~/.vimrc"
|
||||
Files.</para>
|
||||
|
||||
<para> The remaining topics, "/etc/issue (Customizing your logon)", "/etc/shells",
|
||||
"Random number generation", "Man page issues" and "Info page issues" are
|
||||
then addressed, in that order. They don't have much interaction with the
|
||||
other topics in this chapter.
|
||||
</para>
|
||||
<para> The remaining topics, "Customizing your Logon with /etc/issue",
|
||||
"The /etc/shells File", "Random number generation", "Compressing man and info
|
||||
pages" page issues", "Automate Mounting of Removable File Systems" and
|
||||
"Configuring for Network Filesystems" 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"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="skel.xml"/>
|
||||
|
@ -5,13 +5,16 @@
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="postlfs-config-shells">
|
||||
<sect1 id="postlfs-config-shells" xreflabel="The /etc/shells File">
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
</sect1info>
|
||||
<?dbhtml filename="etcshells.html"?>
|
||||
<title>/etc/shells</title>
|
||||
<title>The /etc/shells File</title>
|
||||
<indexterm zone="postlfs-config-shells">
|
||||
<primary sortas="e-etc-shells">/etc/shells</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>The <filename>shells</filename> file contains a list of
|
||||
login shells on the system. Applications use this file to determine
|
||||
@ -24,10 +27,10 @@ own account. If the command name is not listed, the user will be denied of
|
||||
change.</para>
|
||||
|
||||
<para>It is a requirement for applications such as
|
||||
<acronym>GDM</acronym> which does not populate the face browser if it
|
||||
can't find <filename>/etc/shells</filename> or <acronym>FTP</acronym>
|
||||
daemons which traditionally disallow access to users with shells not
|
||||
included in this file.</para>
|
||||
<application><acronym>GDM</acronym></application> which does not populate the
|
||||
face browser if it can't find <filename>/etc/shells</filename> or
|
||||
<acronym>FTP</acronym> daemons which traditionally disallow access to users
|
||||
with shells not included in this file.</para>
|
||||
|
||||
<screen><userinput><command>cat > /etc/shells << "EOF"</command>
|
||||
# Begin /etc/shells
|
||||
|
@ -5,13 +5,17 @@
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="postlfs-config-inputrc" xreflabel="/etc/inputrc">
|
||||
<sect1 id="postlfs-config-inputrc" xreflabel="Introduction to /etc/inputrc">
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
</sect1info>
|
||||
<?dbhtml filename="inputrc.html"?>
|
||||
<title>/etc/inputrc</title>
|
||||
<indexterm zone="postlfs-config-inputrc">
|
||||
<primary sortas="e-etc-inputrc">/etc/inputrc</primary></indexterm>
|
||||
<indexterm zone="postlfs-config-inputrc">
|
||||
<primary sortas="e-AA.inputrc">~/.inputrc</primary></indexterm>
|
||||
|
||||
<para><filename>Inputrc</filename> deals with the mapping of the keyboard for
|
||||
certain situations. This file is the start-up file used by
|
||||
@ -35,11 +39,9 @@ keyboard handling, it is a good idea to place a default
|
||||
<filename>.inputrc</filename> into the <filename>/etc/skel</filename>
|
||||
directory for use with new users.</para>
|
||||
|
||||
<para>
|
||||
Below is a base <filename>/etc/inputrc</filename> along with
|
||||
<para>Below is a base <filename>/etc/inputrc</filename> along with
|
||||
comments to explain what the various options do. Note that comments
|
||||
can <emphasis>not</emphasis> be on the same line as commands.
|
||||
</para>
|
||||
can <emphasis>not</emphasis> be on the same line as commands.</para>
|
||||
|
||||
<para>If you will create an <filename>.inputrc</filename> in
|
||||
<filename>/etc/skel</filename> using the command below, change the
|
||||
@ -47,10 +49,9 @@ 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 root, 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 change owner and group
|
||||
appropriately.
|
||||
</para>
|
||||
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
|
||||
change owner and group appropriately.</para>
|
||||
|
||||
<screen><userinput><command>cat > /etc/inputrc << "EOF"</command>
|
||||
# Begin /etc/inputrc
|
||||
|
@ -5,18 +5,19 @@
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="postlfs-config-logon">
|
||||
<sect1 id="postlfs-config-logon" xreflabel="Customizing your Logon with /etc/issue">
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
</sect1info>
|
||||
<?dbhtml filename="logon.html"?>
|
||||
<title>/etc/issue (Customizing your logon)</title>
|
||||
<title>Customizing your Logon with /etc/issue</title>
|
||||
<indexterm zone="postlfs-config-logon">
|
||||
<primary sortas="e-etc-issue">/etc/issue</primary></indexterm>
|
||||
|
||||
<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
|
||||
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>
|
||||
|
||||
@ -30,8 +31,9 @@ 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 doing
|
||||
this is to do <userinput><command>clear > /etc/issue</command></userinput>.
|
||||
"clear" escape-sequence into <filename>/etc/issue</filename>. A simple way of
|
||||
doing this is to do <userinput><command>clear >
|
||||
/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
|
||||
|
@ -5,7 +5,7 @@
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="postlfs-config-netfs" xreflabel="netfs">
|
||||
<sect1 id="postlfs-config-netfs" xreflabel="Configuring for Network Filesystems">
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
@ -13,7 +13,7 @@
|
||||
<?dbhtml filename="netfs.html"?>
|
||||
<title>Configuring for Network Filesystems</title>
|
||||
<indexterm zone="postlfs-config-netfs">
|
||||
<primary sortas="f-netfs-config">netfs</primary></indexterm>
|
||||
<primary sortas="f-netfs-init">netfs</primary></indexterm>
|
||||
|
||||
<para>While <acronym>LFS</acronym> is capable of mounting network file
|
||||
systems such as <acronym>NFS</acronym>, these are not mounted by the
|
||||
|
@ -5,13 +5,15 @@
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="postlfs-config-random" xreflabel="random">
|
||||
<sect1 id="postlfs-config-random" xreflabel="Random number generation">
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
</sect1info>
|
||||
<?dbhtml filename="random.html"?>
|
||||
<title>Random number generation</title>
|
||||
<indexterm zone="postlfs-config-random">
|
||||
<primary sortas="f-random-init">random</primary></indexterm>
|
||||
|
||||
<para>The Linux kernel supplies a random number generator which is accessed
|
||||
through <filename class="devicefile">/dev/random</filename> and
|
||||
|
@ -5,33 +5,39 @@
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="postlfs-config-skel">
|
||||
<sect1 id="postlfs-config-skel" xreflabel="Configuring for Adding Users">
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
</sect1info>
|
||||
<?dbhtml filename="skel.html"?>
|
||||
<title>Configuring for Adding Users</title>
|
||||
<indexterm zone="postlfs-config-skel">
|
||||
<primary sortas="e-etc-skel">/etc/skel/*</primary></indexterm>
|
||||
<indexterm zone="postlfs-config-skel">
|
||||
<primary sortas="e-etc-default-useradd">/etc/default/useradd</primary>
|
||||
</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 <acronym>LFS</acronym>
|
||||
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>
|
||||
<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
|
||||
<acronym>LFS</acronym> 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 new user's home
|
||||
directory when the <command>/usr/sbin/useradd</command> program adds the 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
|
||||
new user's home directory when the <command>/usr/sbin/useradd</command>
|
||||
program adds the new user.</para>
|
||||
|
||||
<para><emphasis>Useradd</emphasis></para>
|
||||
|
||||
<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 <command>/usr/sbin/useradd
|
||||
-D</command>.</para>
|
||||
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
|
||||
@ -63,17 +69,19 @@ can be set in the <filename>/etc/default/useradd</filename> file.</para>
|
||||
|
||||
<para><emphasis>/etc/skel</emphasis></para>
|
||||
|
||||
<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
|
||||
root. Creating the directory as root is the best way to go.</para>
|
||||
<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 root. Creating the
|
||||
directory as root 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 a
|
||||
user may eventually place in their copy of these files, you should
|
||||
<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 <filename class="directory">/etc/skel</filename> and
|
||||
<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)
|
||||
@ -92,14 +100,16 @@ the following sections, read each section and any references provided,
|
||||
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) 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
|
||||
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
|
||||
of any other user already in the system.</para>
|
||||
|
||||
<para><emphasis>When Adding a User</emphasis></para>
|
||||
@ -107,8 +117,8 @@ of any other user already in the system.</para>
|
||||
<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 overridden) to
|
||||
the new user's home directory. For example:</para>
|
||||
copy files from <filename class="directory">/etc/skel</filename> (can be
|
||||
overridden) to the new user's home directory. For example:</para>
|
||||
|
||||
<screen><command>useradd -m jwrober</command></screen>
|
||||
|
||||
|
@ -5,22 +5,26 @@
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="postlfs-config-vimrc" xreflabel="/etc/vimrc, ~/.vimrc">
|
||||
<sect1 id="postlfs-config-vimrc" xreflabel="The vimrc Files">
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
</sect1info>
|
||||
<?dbhtml filename="vimrc.html"?>
|
||||
<title>/etc/vimrc, ~/.vimrc</title>
|
||||
<title>The /etc/vimrc and ~/.vimrc Files</title>
|
||||
<indexterm zone="postlfs-config-vimrc">
|
||||
<primary sortas="e-etc-vimrc-vimrc">/etc/vimrc</primary></indexterm>
|
||||
<indexterm zone="postlfs-config-vimrc">
|
||||
<primary sortas="e-AA.vimrc-vimrc">~/.vimrc</primary></indexterm>
|
||||
|
||||
<para>The <acronym>LFS</acronym> book installs <application>vim</application>
|
||||
<para>The <acronym>LFS</acronym> book installs <application>Vim</application>
|
||||
as its text editor. At this point we should state that there are a
|
||||
<emphasis>lot</emphasis> of different editing applications out there including
|
||||
<application>emacs</application>, <application>nano</application>,
|
||||
<application>joe</application> and many more. Anyone who has been around the
|
||||
<application>Emacs</application>, <application>nano</application>,
|
||||
<application>Joe</application> and many more. Anyone who has been around the
|
||||
Internet (especially usenet) for a short time will certainly have observed at
|
||||
least one flame war, usually involving <application>vim</application> and
|
||||
<application>emacs</application> users!</para>
|
||||
least one flame war, usually involving <application>Vim</application> and
|
||||
<application>Emacs</application> users!</para>
|
||||
|
||||
<para>The <acronym>LFS</acronym> book gives a basic <filename>vimrc
|
||||
</filename> file. Here, we attempt to enhance this file. At startup,
|
||||
@ -29,8 +33,8 @@ least one flame war, usually involving <application>vim</application> and
|
||||
<filename>vimrc</filename> and the user-specific one.). Note that this is
|
||||
only true if you compiled <application>vim</application> using
|
||||
<acronym>LFS</acronym>-3.1 onwards. Prior to this,
|
||||
the global <filename>vimrc</filename> was <filename>/usr/share/vim/vimrc
|
||||
</filename>.</para>
|
||||
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
|
||||
@ -38,7 +42,8 @@ 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 <filename>/etc/skel</filename>.</para>
|
||||
group if you do copy anything directly from
|
||||
<filename>/etc/skel</filename>.</para>
|
||||
|
||||
<screen>" Begin .vimrc
|
||||
|
||||
@ -48,15 +53,15 @@ set ruler
|
||||
|
||||
" End .vimrc</screen>
|
||||
|
||||
<para>A <acronym>FAQ</acronym> 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>A <acronym>FAQ</acronym> on the <acronym>LFS</acronym> 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>
|
||||
|
||||
<itemizedlist>
|
||||
<!-- <listitem><para><option>set nocompatible</option> : This option
|
||||
stops <command>vim</command> from behaving in a strongly <command>vi
|
||||
</command>-compatible way. It should be at the start of any <filename>vimrc
|
||||
@ -75,24 +80,22 @@ number of columns used on the screen.</para></listitem>
|
||||
background.</para></listitem> -->
|
||||
|
||||
<listitem><para><option>set wrapmargin=8</option>: This is the number of
|
||||
characters from the right window border where wrapping starts.</para>
|
||||
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></listitem> -->
|
||||
|
||||
<listitem><para><option>set ruler</option>: This makes <command>vim
|
||||
</command> show the current row and column at the bottom right of
|
||||
<listitem><para><option>set ruler</option>: This makes
|
||||
<command>vim</command> show the current row and column at the bottom right of
|
||||
the screen.</para></listitem>
|
||||
|
||||
|
||||
</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> 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>
|
||||
|
Loading…
Reference in New Issue
Block a user