r3281 - in trunk/BOOK: . postlfs/config

randy at linuxfromscratch.org randy at linuxfromscratch.org
Thu Jan 13 23:11:02 PST 2005


Author: randy
Date: 2005-01-14 00:11:02 -0700 (Fri, 14 Jan 2005)
New Revision: 3281

Modified:
   trunk/BOOK/general.ent
   trunk/BOOK/postlfs/config/profile.xml
Log:
Added index tags to the postlfs-profile instructions

Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent	2005-01-13 23:20:26 UTC (rev 3280)
+++ trunk/BOOK/general.ent	2005-01-14 07:11:02 UTC (rev 3281)
@@ -1,4 +1,4 @@
-<!ENTITY day          "13">
+<!ENTITY day          "14">
 <!ENTITY month        "01">
 <!ENTITY year         "2005">
 <!ENTITY version      "svn-&year;&month;&day;">

Modified: trunk/BOOK/postlfs/config/profile.xml
===================================================================
--- trunk/BOOK/postlfs/config/profile.xml	2005-01-13 23:20:26 UTC (rev 3280)
+++ trunk/BOOK/postlfs/config/profile.xml	2005-01-14 07:11:02 UTC (rev 3281)
@@ -17,15 +17,16 @@
 referred to as just "the shell") uses a collection of startup files to
 help create an environment.  Each file has a specific use and
 may affect login and interactive environments differently.  The files in
-the <filename class="directory">/etc</filename> directory generally provide global
-settings. If an equivalent file exists in your home directory it may
+the <filename class="directory">/etc</filename> directory generally provide 
+global settings. If an equivalent file exists in your home directory it may
 override the global settings.
 </para>
 
 <para>An interactive login shell is started after a successful login, using
 <filename>/bin/login</filename>, by reading the <filename>/etc/passwd</filename> 
 file.  This shell invocation normally reads <filename>/etc/profile</filename> 
-and its private equivalent <filename>~/.bash_profile</filename> upon startup.</para>
+and its private equivalent <filename>~/.bash_profile</filename> upon 
+startup.</para>
 
 <para>An interactive non-login shell is normally started at the command-line
 (e.g.,  <prompt>[prompt]$</prompt><command>/bin/bash</command>) or by the
@@ -45,16 +46,19 @@
 invocation of the shell.  It is read and executed when a user exits from an
 interactive login shell.</para>
 
-<para>To the standard files, we also add <filename>/etc/bashrc</filename>
-which is called from the user's <filename>~/.bashrc</filename> for 
-system wide initialization of non-login shells.</para>
+<para>To the standard files, <filename>/etc/bashrc</filename> is called from 
+the user's <filename>~/.bashrc</filename> for system wide initialization of 
+non-login shells.</para>
 
 <para>For more information see <command>info bash</command> -- 
 <emphasis role="strong">Nodes: Bash Startup Files and Interactive
 Shells.</emphasis></para>
 
-<sect2>
+<sect2 id="etc-profile-profile">
 <title><filename>/etc/profile</filename></title>
+<indexterm zone="postlfs-config-profile etc-profile-profile">
+<primary sortas="e-etc-profile-profile">/etc/profile</primary>
+</indexterm>
 
 <para>Here is a base <filename>/etc/profile</filename>. This file starts by
 setting up some helper functions and some basic parameters.  It specifies some
@@ -130,26 +134,36 @@
         fi
 done
  
-# Now to clean up after ourselves
+# Now to clean up
 unset pathremove pathprepend pathappend 
 
 # End /etc/profile
 <command>EOF</command></userinput></screen>
 
-<para>Now create the <filename class='directory'>/etc/profile.d</filename> directory.</para>
+<sect3 id="etc-profile.d"><title>The /etc/profile.d directory</title>
+<indexterm zone="postlfs-config-profile etc-profile.d">
+<primary sortas="e-etc-profile.d">/etc/profile.d</primary>
+</indexterm>
 
+<para>Now create the <filename class='directory'>/etc/profile.d</filename> 
+directory, where the individual initialization scripts are placed.</para>
+
 <screen><userinput><command>install --directory --mode=0755 --owner=root --group=root /etc/profile.d</command></userinput></screen>
+</sect3>
 
-<sect3>
+<sect3 id="etc-profile.d-dircolors.sh">
 <title><filename>/etc/profile.d/dircolors.sh</filename></title>
+<indexterm zone="postlfs-config-profile etc-profile.d-dircolors.sh">
+<primary 
+sortas="e-etc-profile.d-dircolors.sh">/etc/profile.d/dircolors.sh</primary>
+</indexterm>
 
 <para>This script uses the <filename>~/.dircolors</filename> and
 <filename>/etc/dircolors</filename> files to control the colors of file names in a
 directory listing. They control colorized output of things like <command>ls
 --color</command>.  The explaination of how to initialize these files is at the
-end of this section.  </para>
+end of this section.</para>
 
-
 <screen><userinput><command>cat > /etc/profile.d/dircolors.sh << "EOF"</command>
 # Setup for /bin/ls to support color, the alias is in /etc/bashrc.
 if [ -f "/etc/dircolors" ] ; then
@@ -163,15 +177,19 @@
 <command>EOF</command></userinput></screen>
 </sect3>
 
-
-<sect3>
+<sect3 id="extrapaths.sh">
 <title><filename>/etc/profile.d/extrapaths.sh</filename></title>
+<indexterm zone="postlfs-config-profile extrapaths.sh">
+<primary 
+sortas="e-etc-profile.d-extrapaths.sh">/etc/profile.d/extrapaths.sh</primary>
+</indexterm>
 
 <para>This script adds several useful paths to the <envar>PATH</envar> and
-<envar>PKG_CONFIG_PATH</envar> environment variables.  If you want, you can uncomment
-the last section to put a dot at the end of your path. This will allow executables in the 
-current working directory to be executed without specifiying a ./, however
-you are warned that this is generally considered a security hazard.</para>
+<envar>PKG_CONFIG_PATH</envar> environment variables.  If you want, you can 
+uncomment the last section to put a dot at the end of your path. This will 
+allow executables in the current working directory to be executed without 
+specifiying a ./, however you are warned that this is generally considered a 
+security hazard.</para>
  
 <screen><userinput><command>cat > /etc/profile.d/extrapaths.sh << "EOF"</command>
 if [ -d /usr/local/lib/pkgconfig ] ; then
@@ -198,11 +216,16 @@
 <command>EOF</command></userinput></screen>
 </sect3>
 
-<sect3>
+<sect3 id="readline.sh">
 <title><filename>/etc/profile.d/readline.sh</filename></title>
+<indexterm zone="postlfs-config-profile readline.sh">
+<primary 
+sortas="e-etc-profile.d-readline.sh">/etc/profile.d/readline.sh</primary>
+</indexterm>
 
-<para>This script sets up the default <filename>inputrc</filename> configuration file.
-If the user does not have individual settings, it uses the global file.</para>
+<para>This script sets up the default <filename>inputrc</filename> 
+configuration file. If the user does not have individual settings, it uses the 
+global file.</para>
 
 <screen><userinput><command>cat > /etc/profile.d/readline.sh << "EOF"</command>
 # Setup the INPUTRC environment variable.
@@ -213,10 +236,15 @@
 <command>EOF</command></userinput></screen>
 </sect3>
 
-<sect3>
+<sect3 id="tinker-term.sh">
 <title><filename>/etc/profile.d/tinker-term.sh</filename></title>
+<indexterm zone="postlfs-config-profile tinker-term.sh">
+<primary 
+sortas="e-etc-profile.d-tinker-term.sh">/etc/profile.d/tinker-term.sh</primary>
+</indexterm>
 
-<para>Some applications need a specific <envar>TERM</envar> setting to support color.</para>
+<para>Some applications need a specific <envar>TERM</envar> setting to support 
+color.</para>
 
 <screen><userinput><command>cat > /etc/profile.d/tinker-term.sh << "EOF"</command>
 # This will tinker with the value of TERM in order to convince certain 
@@ -232,12 +260,16 @@
 <command>EOF</command></userinput></screen>
 </sect3>
 
-<sect3>
+<sect3 id="umask.sh">
 <title><filename>/etc/profile.d/umask.sh</filename></title>
+<indexterm zone="postlfs-config-profile umask.sh">
+<primary 
+sortas="e-etc-profile.d-umask.sh">/etc/profile.d/umask.sh</primary>
+</indexterm>
  
-<para>Setting the <command>umask</command> value is important for security. Here
-we turn off the default group write permissions for system users and when the
-user name and group name are not the same.</para>
+<para>Setting the <command>umask</command> value is important for security. 
+Here the default group write permissions are turned off for system users and when 
+the user name and group name are not the same.</para>
 
 <screen><userinput><command>cat > /etc/profile.d/umask.sh << "EOF"</command>
 # By default we want the umask to get set.
@@ -249,11 +281,15 @@
 <command>EOF</command></userinput></screen>
 </sect3>
 
-<sect3>
+<sect3 id="X.sh">
 <title><filename>/etc/profile.d/X.sh</filename></title>
+<indexterm zone="postlfs-config-profile X.sh">
+<primary 
+sortas="e-etc-profile.d-X.sh">/etc/profile.d/X.sh</primary>
+</indexterm>
 
-<para>If <application>X</application> is installed, we also update the <envar>PATH</envar>
-and <envar>PKG_CONFIG_PATH</envar> variables.</para>
+<para>If <application>X</application> is installed, the <envar>PATH</envar> 
+and <envar>PKG_CONFIG_PATH</envar> variables are also updated.</para>
 
 <screen><userinput><command>cat > /etc/profile.d/X.sh << "EOF"</command>
 if [ -x /usr/X11R6/bin/X ]; then
@@ -265,14 +301,19 @@
 <command>EOF</command></userinput></screen>
 </sect3>
 
-<sect3>
+<sect3 id="titlebars.sh">
 <title><filename>/etc/profile.d/xterm-titlebars.sh</filename></title>
+<indexterm zone="postlfs-config-profile titlebars.sh">
+<primary 
+sortas="e-etc-profile.d-titlebars.sh">/etc/profile.d/titlebars.sh</primary>
+</indexterm>
+
+<para>This script shows an example of a different way of setting the prompt. 
+The normal variable, <envar>PS1</envar>, is supplemented by 
+<envar>PROMPT_COMMAND</envar>. If set, the value of 
+<envar>PROMPT_COMMAND</envar> is executed as a command prior to issuing each 
+primary prompt.</para>
  
-<para>This script shows an example of a different way of setting the prompt.  The normal
-variable, <envar>PS1</envar>, is supplemented by <envar>PROMPT_COMMAND</envar>.
-If set, the value of <envar>PROMPT_COMMAND</envar> is executed as a command prior to 
-issuing each primary prompt. </para>
- 
 <screen><userinput><command>cat > /etc/profile.d/xterm-titlebars.sh << "EOF"</command>
 # The substring match ensures this works for "xterm" and "xterm-xfree86".
 if [ "${TERM:0:5}" = "xterm" ]; then
@@ -282,8 +323,12 @@
 <command>EOF</command></userinput></screen>
 </sect3>
 
-<sect3>
+<sect3 id="i18n.sh">
 <title><filename>/etc/profile.d/i18n.sh</filename></title>
+<indexterm zone="postlfs-config-profile i18n.sh">
+<primary 
+sortas="e-etc-profile.d-i18n.sh">/etc/profile.d/i18n.sh</primary>
+</indexterm>
 
 <para>This script shows how to set some environment variables necessary for 
 native language support. Setting these variables properly gives you:</para> 
@@ -326,9 +371,10 @@
 export G_FILENAME_ENCODING=@locale
 <command>EOF</command></userinput></screen>
 
-<para>The <envar>LC_ALL</envar> variable sets the same value for all locale categories. For 
-better control, you may prefer to set values individually for all categories 
-listed in the output of the <command>locale</command> command.</para>
+<para>The <envar>LC_ALL</envar> variable sets the same value for all locale 
+categories. For better control, you may prefer to set values individually for 
+all categories listed in the output of the <command>locale</command> 
+command.</para>
 
 <para>The <envar>G_FILENAME_ENCODING</envar> variable tells applications
 such as <application>Glib</application> and
@@ -340,15 +386,20 @@
 <sect3>
 <title><filename>Other initialization values</filename></title>
 
-<para>Other initialization can easily be added to the <filename>profile</filename>
-by adding additional scripts to the 
+<para>Other initialization can easily be added to the 
+<filename>profile</filename> by adding additional scripts to the 
 <filename class='directory'>/etc/profile.d</filename> directory.</para>
 </sect3>
 
 </sect2>
 
-<sect2>
+<sect2 id="etc-bashrc-profile">
 <title><filename>/etc/bashrc</filename></title>
+<indexterm zone="postlfs-config-profile etc-bashrc-profile">
+<primary 
+sortas="e-etc-bashrc-profile">/etc/bashrc</primary>
+</indexterm>
+
 <para>Here is a base <filename>/etc/bashrc</filename>.  Comments in the
 file should explain everything you need.</para>
 
@@ -392,9 +443,11 @@
 <command>EOF</command></userinput></screen>
 </sect2>
 
-
-<sect2>
+<sect2 id="bash_profile-profile">
 <title><filename>~/.bash_profile</filename></title>
+<indexterm zone="postlfs-config-profile bash_profile-profile">
+<primary sortas="e-AA.bash_profile-profile">~/.bash_profile</primary>
+</indexterm>
 
 <para>Here is a base <filename>~/.bash_profile</filename>.  If you want each
 new user to have this file automatically, just change the output of
@@ -444,8 +497,11 @@
 <command>EOF</command></userinput></screen>
 </sect2>
  
-<sect2>
+<sect2 id="bashrc-profile">
 <title><filename>~/.bashrc</filename></title>
+<indexterm zone="postlfs-config-profile bashrc-profile">
+<primary sortas="e-AA.bashrc-profile">~/.bashrc</primary>
+</indexterm>
 
 <para>Here is a base <filename>~/.bashrc</filename>.  The comments and
 instructions for using <filename class="directory">/etc/skel</filename> for
@@ -473,8 +529,11 @@
 </sect2>
  
  
-<sect2>
+<sect2 id="bash_logout-profile">
 <title><filename>~/.bash_logout</filename></title>
+<indexterm zone="postlfs-config-profile bash_logout-profile">
+<primary sortas="e-AA.bash_logout-profile">~/.bash_logout</primary>
+</indexterm>
 
 <para>This is an empty <filename>~/.bash_logout</filename> that can be used as
 a template.  You will notice that the base <filename>~/.bash_logout</filename>
@@ -493,14 +552,20 @@
 </sect2>
  
  
-<sect2>
+<sect2 id="etc-dircolors-profile">
 <title><filename>/etc/dircolors</filename></title>
+<indexterm zone="postlfs-config-profile etc-dircolors-profile">
+<primary sortas="e-etc-dircolors-profile">/etc/dircolors</primary>
+</indexterm>
+<indexterm zone="postlfs-config-profile etc-dircolors-profile">
+<primary sortas="e-AA.dircolors-profile">~/.dircolors</primary>
+</indexterm>
 
 <para> If you want to use the <filename>dircolors</filename> capability, then
 run the following command. The <filename class="directory">/etc/skel</filename>
 setup steps seen above also can be used here to provide a
-<filename>.dircolors</filename> file when a new user is set up. As before, just
-change the output file name on the following command and assure the
+<filename>~/.dircolors</filename> file when a new user is set up. As before, 
+just change the output file name on the following command and assure the
 permissions, owner, and group are correct on the files created and/or copied.
 </para>
 
@@ -513,7 +578,8 @@
 
 <para>Finally, Ian Macdonald has written an excellent collection of tips and
 tricks to enhance your shell environment.  You can read it online at
-<ulink
-url="http://www.caliban.org/bash/index.shtml">http://www.caliban.org/bash/index.shtml</ulink>.</para>
+<ulink 
+url="http://www.caliban.org/bash/index.shtml">
+http://www.caliban.org/bash/index.shtml</ulink>.</para>
 </sect2>
 </sect1>




More information about the blfs-book mailing list