Changeset cfc2a54


Ignore:
Timestamp:
08/22/2003 03:37:27 PM (19 years ago)
Author:
Larry Lawrence <larry@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, krejzi/svn, lazarus, nosym, perl-modules, qt5new, systemd-11177, systemd-13485, trunk, upgradedb, v5_0, v5_0-pre1, v5_1, v5_1-pre1, xry111/intltool, xry111/soup3, xry111/test-20220226
Children:
0108c1d
Parents:
71f73f0f
Message:

Added Bill's patch to postlfs

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@984 af4574ff-66df-0310-9fd7-8a98e5e911e0

Location:
postlfs/config
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • postlfs/config/bootdisk.xml

    r71f73f0f rcfc2a54  
    55<para>How to create a decent bootdisk</para>
    66<para>The intent here is to create a "rescue bootdisk" that will load
    7 enough 'linux' to enable you to do rescue operations.  With what is presented here
    8 you will be able to do file manipulation, mounting and unmounting, and other tasks.
    9 This however is not the limit.  The minimal disk is described here, and you can
     7enough 'linux' to enable you to do rescue operations.  What is presented here
     8is enough to do file manipulation, mounting and unmounting, and other tasks.
     9This, however, is not the limit.  The minimal disk is described here, and you can
    1010add anything you can fit on the floppy.</para>
    1111<para>
    12 Boot disk/Rescue Disk
     12Boot Disk/Rescue Disk
    1313</para>
    1414<para>
    15 First we will create a loopback file to build our rescue disk image on, next
    16 we'll make a file system on the image file, then we'll use 'mount' to mount
    17 the file as a regular disk, allowing us to read and write files from the loopback file.
     15First we will create a loopback file on which we build the root file
     16system for our rescue disk image.  This is commonly known as the initial
     17ramdisk, or initrd for short, and it is automatically loaded by the boot
     18process if all setup is done correctly.</para>
     19<para>
     20Next we'll make a file system on the loopback file and use 'mount' to mount
     21the loopback file as a regular disk, allowing us to read and write files there.
    1822The following commands will build us a 4 MB image.
    1923</para>
     
    3337anyway.  If you used MAKEDEV to create your devices, you'll want to
    3438trim the <filename>/mnt/loop1/dev</filename> directory to reclaim the inode space wasted
    35 by all of the devices in the <filename>dev</filename> directory you don't use.</para>
     39by the devices you don't use in the <filename>dev</filename> directory.</para>
    3640<para><screen><userinput>cp -dpR /dev/* /mnt/loop1/dev</userinput></screen></para>
    3741<para>Now to tend to the <filename>/etc</filename> directory.  To start, all we will do is use
  • postlfs/config/config.xml

    r71f73f0f rcfc2a54  
    44
    55<para>The intention of LFS is to provide a basic system which you can
    6 build upon.  There are several things which many people wonder about to
    7 do with tidying up their system once they have done the base install.
     6build upon.  There are several things, about tidying up the system,
     7which many people wonder about once they have done the base install.
    88We hope to cover these issues in this chapter.</para>
    99
     
    1313these files can be found in the <filename>/etc</filename> hierarchy.
    1414There are often graphical configuration programs available for different
    15 subsystems but these are mostly simply pretty frontends to the process
     15subsystems but most are simply pretty frontends to the process
    1616of editing the file.  The advantage of text-only configuration is that
    1717you can edit parameters using your favorite text editor, whether that
    1818be vim, emacs or anything else.</para>
    1919
     20<para>The first task is making a recovery diskette because it's the most
     21critical need. Then the system is configured to ease addition of
     22new users, in "Configuring for Adding Users", because this
     23can affect the choices you make in the three subsequent topics -
     24"/etc/inputrc", "The Bash Shell Startup Files" and
     25"/etc/vimrc, ~/.vimrc".
     26</para>
     27
     28<para> The remaining topics, "/etc/issue (Customizing your logon)",
     29"Random number generation", "Man page issues" and "Info page issues" are
     30then addressed, in that order. They don't have much interaction with the
     31other topics in this chapter.
     32</para>
     33
     34&postlfs-config-bootdisk;
     35&postlfs-config-skel;
     36&postlfs-config-inputrc;
     37&postlfs-config-profile;
     38&postlfs-config-vimrc;
    2039&postlfs-config-logon;
    21 &postlfs-config-profile;
    22 &postlfs-config-inputrc;
    2340&postlfs-config-random;
    24 &postlfs-config-vimrc;
    25 &postlfs-config-bootdisk;
    2641&postlfs-config-manpages;
    2742&postlfs-config-infopages;
    28 &postlfs-config-skel;
    2943
    3044</chapter>
  • postlfs/config/inputrc.xml

    r71f73f0f rcfc2a54  
    33<title>/etc/inputrc</title>
    44
    5 <para><filename>inputrc</filename> deals with the mapping of the keyboard for
     5<para><filename>Inputrc</filename> deals with the mapping of the keyboard for
    66certain situations.  This file is the start-up file used by
    77<application>readline</application> - the input related library used by
     
    1313one rc file.</para>
    1414
    15 <para>The following is a base <filename>/etc/inputrc</filename> along with
    16 comments to explain what the various options do.</para>
     15<para>Global values are set in <filename>/etc/inputrc</filename>.
     16Personal user values are set in <filename>~/.inputrc</filename>. The
     17<filename>~/.inputrc</filename> file will override the global settings
     18file.  A later page sets up <application>Bash</application> to use
     19<filename>/etc/inputrc</filename> if there is no
     20<filename>.inputrc</filename> for a user when
     21<filename>/etc/profile</filename> is read (usually at login).  If you
     22want your system to use both, or don't want <emphasis>global</emphasis>
     23keyboard handling, it is a good idea to place a default
     24<filename>.inputrc</filename> into the <filename>/etc/skel</filename>
     25directory for use with new users.</para>
    1726
    18 <para>Please note that comments can <emphasis>not</emphasis> be on the
    19 same line as commands in <filename>inputrc</filename>.</para>
     27<para>
     28Below is a base <filename>/etc/inputrc</filename> along with
     29comments to explain what the various options do.  Note that comments
     30can <emphasis>not</emphasis> be on the same line as commands.
     31</para>
     32
     33<para>If you will create an <filename>.inputrc</filename> in
     34<filename>/etc/skel</filename> using the command below, change the
     35command's output to <filename>/etc/skel/.inputrc</filename> and be
     36sure to check/set permissions afterward. Then you can just copy that
     37file to <filename>/etc/inputrc</filename> and the home directory
     38of any user already existing in the system, including root, that needs
     39a private version of the file.  Be sure to use the "-p"  parameter
     40of "cp" to maintain permissions and be sure to change owner and group
     41appropriately.
     42</para>
    2043
    2144<screen><userinput><command>cat &gt; /etc/inputrc &lt;&lt; "EOF"</command>
     
    6083<command>EOF</command></userinput></screen>
    6184
    62 <para>Global values are set in <filename>/etc/inputrc</filename>.
    63 Personal user values as are set in <filename>~/.inputrc</filename>. The
    64 <filename>~/.inputrc</filename> file will override the global settings
    65 file.  The previous page sets up <application>Bash</application> to use
    66 <filename>/etc/inputrc</filename> by default.  If you want your system
    67 to use both, it might be a good idea to place a default
    68 <filename>.inputrc</filename> into the <filename>/etc/skel</filename>
    69 directory for use with new users.</para>
    70 
    7185</sect1>
  • postlfs/config/logon.xml

    r71f73f0f rcfc2a54  
    1616<command>ssh</command> however, will only use it if you set the option in the
    1717configuration file and will also <emphasis>not</emphasis> interpret the
    18 escape sequences as shown below.</para>
     18escape sequences shown below.</para>
    1919
    2020<para>One of the most common things which people want to do is to clear
    2121the screen at each logon.  The easiest way of doing that is to put a
    22 "clear" escape into <filename>/etc/issue</filename>.  A simple way of doing
     22"clear" escape-sequence into <filename>/etc/issue</filename>.  A simple way of doing
    2323this is to do <userinput><command>clear &gt; /etc/issue</command></userinput>. 
    2424This will insert the relevant escape code into the start of the
  • postlfs/config/profile.xml

    r71f73f0f rcfc2a54  
    66referred to as just "the shell") uses a collection of startup files to
    77help create an environment to run in.  Each file has a specific use and
    8 may affect login and interactive environments differently.</para>
    9 
    10 <para>An interactive login shell is started after a successful login by
    11 <filename>/bin/login</filename> by reading the
     8may affect login and interactive environments differently.  The files in
     9the <filename>/etc</filename> directory generally provide global
     10settings. If an equivalent file exists in your home directory it may
     11override the global settings.
     12</para>
     13
     14<para>An interactive login shell is started after a successful login, using
     15<filename>/bin/login</filename>, by reading the
    1216<filename>/etc/passwd</filename> file.  An
    1317interactive non-login shell is started at the command line (e.g.
     
    2125Shells.</emphasis></para>
    2226
    23 <para>The following files are needed to make sure that the correct
    24 environment is read for each of the ways the shell can be invoked:
    25 <filename>/etc/profile</filename>, <filename>/etc/bashrc</filename>,
     27<para>The following files are used to make sure that the correct
     28environment is established for each of the ways the shell can be invoked:
     29<filename>/etc/profile</filename> and its private equivalent
    2630<filename>~/.bash_profile</filename>, and
    27 <filename>~/.bashrc</filename>.  The file
    28 <filename>~/.bash_logout</filename> is not used for an invocation of the
    29 shell.  It is read by the shell when a user logouts of the system.  The
    30 files <filename>/etc/profile</filename> and
     31<filename>/etc/bashrc</filename> (unofficial) and its private equivalent
     32<filename>~/.bashrc</filename>.
     33</para>
     34
     35<para>
     36The file <filename>~/.bash_logout</filename> is not used for an
     37invocation of the shell.  It is read by the shell when a user logs out
     38of the system.</para>
     39
     40<para>The files <filename>/etc/profile</filename> and
    3141<filename>~/.bash_profile</filename> are read when the shell is invoked
    32 as a interactive login shell.  The file <filename>~/.bashrc</filename>
     42as an interactive login shell.  The file <filename>~/.bashrc</filename>
    3343is read when the shell is invoked as an interactive non-login
    34 shell.</para>
     44shell and it reads <filename>/etc/bashrc</filename> if it exists</para>
     45
     46<para>Also useful are the <filename>/etc/dircolors</filename> and
     47<filename>~/.dircolors</filename> files called from
     48<filename>/etc/profile</filename>. They control colorized output of
     49things like <emphasis>ls --color</emphasis>.
     50</para>
    3551
    3652<para>Here is a base <filename>/etc/profile</filename>.  Comments in the
     
    141157
    142158<para>Here is a base <filename>~/.bash_profile</filename>.  Comments in
    143 the file should explain everything you need.</para>
     159the file should explain everything you need.  If you want each new user
     160to have this file automatically provided, just change the output of the
     161next command to <filename>/etc/skel/.bash_profile</filename> and check the
     162permissions after the command is run. You can then copy
     163<filename>/etc/skel/.bash_profile</filename> to the home directories of
     164already existing users, including root, and set the owner and group
     165appropriately.
     166</para>
    144167
    145168<screen><userinput><command>cat &gt; ~/.bash_profile &lt;&lt; "EOF"</command>
     
    168191
    169192<para>Here is a base <filename>~/.bashrc</filename>.  Comments in the
    170 file should explain everything you need.</para>
     193file should explain everything you need.  The comments and
     194instructions for using <filename>/etc/skel</filename> for
     195<filename>.bash_profile</filename> above also apply here. Only the
     196target file names are different.</para>
    171197
    172198<screen><userinput><command>cat &gt; ~/.bashrc &lt;&lt; "EOF"</command>
     
    205231<command>EOF</command></userinput></screen>
    206232
    207 <para>If you want to use the <filename>/etc/dircolors</filename> or
    208 <filename>~/.dircolors</filename> files called from
    209 <filename>/etc/profile</filename>, then run the following:
    210 <userinput>/bin/dircolors -p > /etc/dircolors</userinput> or
    211 <userinput>/bin/dircolors -p > ~/.dircolors</userinput> respectively.
    212 The file in the <filename>/etc</filename> directory should be used for
    213 global settings and if one exists in your home directory then it will
    214 overwrite the global settings.  It might be a good idea to create a base
    215 <filename>.dircolors</filename> file and place it in the
    216 <filename>/etc/skel</filename> directory for new users.</para>
     233<para>
     234If you want to use the <filename>dircolors</filename> capability
     235then run the following command. The <filename>/etc/skel</filename> setup
     236steps seen above also can be used here to provide a
     237<filename>.dircolors</filename> file when a new user is set up. As
     238before, just change the output file name on the following command and
     239assure the permissions, owner and group are correct on the files created
     240and/or copied.
     241</para>
     242
     243<para>
     244<userinput><command>/bin/dircolors -p > /etc/dircolors</command></userinput>
     245</para>
    217246
    218247<para>Ian Macdonald has written an excellent collection of tips and
  • postlfs/config/skel.xml

    r71f73f0f rcfc2a54  
    11<sect1 id="postlfs-config-skel">
    22<?dbhtml filename="skel.html" dir="postlfs"?>
    3 <title>/etc/skel</title>
     3<title>Configuring for Adding Users</title>
    44
    5 <para>The <filename>/etc/skel</filename> directory is quite simple
    6 to setup and use.  It provides a way to make sure that all new users on
    7 your LFS system begin with the same settings.  The
    8 <filename>/etc/skel</filename> directory is used by the
    9 <filename>/usr/sbin/useradd</filename> program.</para>
     5<para>Together, the <filename>/usr/sbin/useradd</filename> command and
     6<filename>/etc/skel</filename> directory (both are easy to setup and use)
     7provide a way to assure new users are added on your LFS system with the
     8same beginning settings for things like $PATH, keyboard processing and
     9environmental variables.  Using these two facilities makes it easier to
     10assure this initial state for each new user.
     11</para>
    1012
    11 <para>For more information see <userinput>man useradd</userinput>.</para>
     13<para>
     14The <filename>/etc/skel</filename> directory holds copies of various
     15initialization and other files that may be copied to the new user's home
     16directory when the <filename>/usr/sbin/useradd</filename>
     17program adds the new user.</para>
    1218
    13 <para>To get started create a <filename>/etc/skel</filename> directory.
    14 Creating the directory as root is the best way to go.  Next copy any
    15 files into <filename>/etc/skel</filename> that you want every new user
    16 to have placed in their home drive.  Examples include
    17 <filename>.bash_profile</filename>, <filename>.bashrc</filename>,
    18 <filename>.bash_logout</filename>, <filename>dircolors</filename>,
    19 <filename>.inputrc</filename> and <filename>.vimrc</filename>.</para>
     19<para>Useradd</para>
    2020
    21 <para>When creating a new user with
    22 <filename>/usr/sbin/useradd</filename> use the <userinput>-m</userinput>
    23 parameter.  For example:</para>
    24 
    25 <para><screen><userinput>useradd -m -s/bin/bash jwrober</userinput></screen></para>
    26 
    27 <para>The <filename>/usr/sbin/useradd</filename> program uses a
    28 collection of default values.  It will read them from the
    29 <filename>/etc/default/useradd</filename> file if it exists.  If the
    30 file does not exist, then it uses some internal defaults.  They can be
    31 found by running <userinput>/usr/sbin/useradd -D</userinput>.</para>
     21<para>The <filename>useradd</filename> program uses a collection of
     22default values kept in <filename>/etc/default/useradd</filename>,
     23if it exists.  If the file does not exist, then it uses some internal
     24defaults.  You can see the default values by running
     25<userinput>/usr/sbin/useradd -D</userinput>.
     26</para>
    3227
    3328<para>To change these values to something new, create a base
     
    5348
    5449<para>This will set the <userinput>SHELL=</userinput> line to
    55 <userinput>SHELL=/bin/bash</userinput>.  This makes it even easier to
    56 add new users to your LFS system.  The
    57 <filename>/usr/sbin/useradd</filename> has many parameters that can be
    58 set in the <filename>/etc/default/useradd</filename> file.  See the man
    59 page for more details.</para>
     50<userinput>SHELL=/bin/bash</userinput>.</para>
     51
     52<para><filename>Useradd</filename> has many parameters that
     53can be set in the <filename>/etc/default/useradd</filename> file.
     54</para>
     55
     56<para>For more information see <userinput>man useradd</userinput>.</para>
     57
     58<para>/etc/skel</para>
     59
     60<para>To get started create an <filename>/etc/skel</filename> directory
     61and make sure it is writable only by the system administrator, usually
     62root. Creating the directory as root is the best way to go.</para>
     63
     64<para>The mode of any files from this part of the book that you put in
     65<filename>/etc/skel</filename> should be writable only by the owner.
     66Also, since there is no telling what kind of sensitive information a
     67user may eventually place in their copy of these files, you should
     68make them unreadable by "group" and "other".</para>
     69
     70<para>You can also put other files in <filename>/etc/skel</filename> and
     71different permissions may be needed for them.
     72</para>
     73
     74<para>
     75Decide which initialization files should be provided in every (or most)
     76new user's home directory. The decisions you make will affect what you
     77do in the next three sections, "/etc/inputrc", "The Bash Shell Startup
     78Files" and "/etc/vimrc, ~/.vimrc". Some or all of those files will be
     79useful for root, any already-existing users, and new users.</para>
     80
     81<para>The files from those sections that you might want to place in
     82<filename>/etc/skel</filename> include
     83<filename>.inputrc</filename>, <filename>.bash_profile</filename>,
     84<filename>.bashrc</filename>, <filename>.bash_logout</filename>,
     85<filename>.dircolors</filename>, and <filename>.vimrc</filename>. If
     86you are unsure which of these should be placed there, just continue to
     87the following sections, read each section and any references provided,
     88and then make your decision.</para>
     89
     90<para>You will run a slightly modified set of commands for files which
     91are placed in <filename>/etc/skel</filename>. Each section will remind
     92you of this. In brief, the book's commands have been written for files
     93<emphasis>not</emphasis> added to <filename>/etc/skel</filename> and
     94just send the results to the user's home directory. If the file is going
     95to be in <filename>/etc/skel</filename>, change the book's command(s) to
     96send output there instead and then just copy the file from
     97<filename>/etc/skel</filename> to the appropriate directories, like
     98<filename>/etc</filename>, <filename>~</filename> or the home directoriy
     99of any other user already in the system.</para>
     100
     101<para>When Adding a User</para>
     102
     103<para>When adding a new user with <filename>useradd</filename> use
     104the <userinput>-m</userinput> parameter, which tells
     105<filename>useradd</filename> to create the user's home directory and
     106copy files from <filename>/etc/skel</filename> (can be overridden) to
     107the new user's home directory.  For example:</para>
     108
     109<para><screen><userinput>useradd -m -s/bin/bash jwrober</userinput></screen></para>
    60110
    61111</sect1>
  • postlfs/config/vimrc.xml

    r71f73f0f rcfc2a54  
    1717the global vimrc was <filename>/usr/share/vim/vimrc</filename>.</para>
    1818
    19 <para>Here is an example of a slightly expanded vimrc:</para>
     19<para>Here is a slightly expanded vimrc that you can put in
     20<filename>/etc/vimrc</filename> to provide global effect. Of course, if
     21you put it into <filename>/etc/skel/.vimrc</filename> instead, it will
     22be made available to users you add to the system later. You can also copy
     23the file from <filename>/etc/skel/.vimrc</filename> to
     24<filename>/etc/vimrc</filename> and the home directory of users already
     25on the system, like root. Be sure to set permissions, owner and group if
     26you do copy anything directly from <filename>/etc/skel</filename>.</para>
    2027
    2128<para><screen>" Begin .vimrc
Note: See TracChangeset for help on using the changeset viewer.