Browse Source

fix bugs #335 and #342 plus various touch ups, layout fixed (line wrapping mostly)

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1864 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Gerard Beekmans 23 years ago
parent
commit
3f12743405

+ 11 - 0
chapter01/changelog.xml

@@ -27,6 +27,17 @@
 
 </para></listitem>
 
+<listitem><para>May 2nd, 2002 [gerard]: Chapter 06 - Procps: Changed the
+two single quotes to two double quotes (the two single quotes can be
+mistaken for one double quote which will cause an error).</para></listitem>
+
+<listitem><para>May 2nd, 2002 [gerard]: Changed the
+<userinput>cd dir && ln -sf</userinput> commands to one single command
+(such as <userinput>ln -sf bash $LFS/bin/sh</userinput> Same goes for
+<userinput>cd dir && mv/cp</userinput> constructions which are now replaced
+with constructions like
+<userinput>mv $LFS/usr/bin/{bzcat,bzip2} $LFS/bin</userinput></para></listitem>
+
 <listitem><para>May 2nd, 2002 [markh]: Removed the "Removing old NSS
 library files" section.</para></listitem>
 

+ 5 - 5
chapter05/bash-exp.xml

@@ -28,11 +28,11 @@ trouble later on in this chapter when you install the Texinfo package.
 That package requires ncurses and termcap can't reliably be used
 there.</para>
 
-<para><userinput>ln -sf bash sh:</userinput> This command creates the sh
-symlink that points to bash. Most scripts run themselves via 'sh'
-(invoked by the #!/bin/sh as the first line in the scripts) which
-invokes a special bash mode. Bash will then behave (as closely as
-possible) as the original Bourne shell.</para>
+<para><userinput>ln -sf bash $LFS/bin/sh:</userinput> This command creates
+the <filename class="symlink">sh</filename> symlink that points to bash. Most
+scripts run themselves via 'sh' (invoked by the #!/bin/sh as the first line
+in the scripts) which invokes a special bash mode. Bash will then behave
+(as closely as possible) as the original Bourne shell.</para>
 
 <para>The <userinput>&amp;&amp;</userinput>'s at the end of every line cause 
 the next command to be executed only if the previous command exists 

+ 4 - 6
chapter05/bash-inst.xml

@@ -15,18 +15,16 @@ or you just installed it, check for the two files again. Often the
 create <filename>libcurses.a</filename> as a symlink by running the 
 following commands as user root:</para>
 
-<para><screen><userinput>cd /usr/lib &amp;&amp;
-ln -s libncurses.a libcurses.a</userinput></screen></para>
+<para><screen><userinput>ln -s libncurses.a /usr/lib/libcurses.a</userinput></screen></para>
 
 <para>Now we can continue. Install Bash by running the following 
 commands:</para>
 
-<para><screen><userinput>./configure --enable-static-link --prefix=$LFS/usr \
-&nbsp;&nbsp;&nbsp;--bindir=$LFS/bin --with-curses &amp;&amp;
+<para><screen><userinput>./configure --enable-static-link \
+&nbsp;&nbsp;&nbsp;&nbsp;--prefix=$LFS/usr --bindir=$LFS/bin --with-curses &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
-cd $LFS/bin &amp;&amp;
-ln -sf bash sh</userinput></screen></para>
+ln -sf bash $LFS/bin/sh</userinput></screen></para>
 
 <para>If the make install phase ends with something along the lines of</para>
 

+ 1 - 2
chapter05/bzip2-inst.xml

@@ -5,8 +5,7 @@
 
 <para><screen><userinput>make CC="gcc -static" &amp;&amp;
 make PREFIX=$LFS/usr install &amp;&amp;
-cd $LFS/usr/bin &amp;&amp;
-mv bzcat bunzip2 bzip2 bzip2recover bzless bzmore $LFS/bin</userinput></screen></para>
+mv $LFS/usr/bin/{bzcat,bunzip2,bzip2,bzip2recover,bzless,bzmore} $LFS/bin</userinput></screen></para>
 
 <para>Although it's not strictly a part of a basic LFS system it's worth
 mentioning that a patch for Tar can be downloaded which enables the tar

+ 11 - 11
chapter05/creatingdirs.xml

@@ -10,17 +10,17 @@ Issuing the following commands will create a default directory layout:</para>
 <para><screen><userinput>cd $LFS &amp;&amp;
 mkdir -p bin boot dev/pts etc/opt home lib mnt proc root sbin tmp var opt &amp;&amp;
 for dirname in $LFS/usr $LFS/usr/local
-&nbsp;&nbsp;&nbsp;do
-&nbsp;&nbsp;&nbsp;mkdir $dirname
-&nbsp;&nbsp;&nbsp;cd $dirname
-&nbsp;&nbsp;&nbsp;mkdir bin etc include lib sbin share src
-&nbsp;&nbsp;&nbsp;ln -s share/man
-&nbsp;&nbsp;&nbsp;ln -s share/doc
-&nbsp;&nbsp;&nbsp;ln -s share/info
-&nbsp;&nbsp;&nbsp;cd $dirname/share
-&nbsp;&nbsp;&nbsp;mkdir dict doc info locale man nls misc terminfo zoneinfo
-&nbsp;&nbsp;&nbsp;cd $dirname/share/man
-&nbsp;&nbsp;&nbsp;mkdir man{1,2,3,4,5,6,7,8}
+&nbsp;&nbsp;&nbsp;&nbsp;do
+&nbsp;&nbsp;&nbsp;&nbsp;mkdir $dirname
+&nbsp;&nbsp;&nbsp;&nbsp;cd $dirname
+&nbsp;&nbsp;&nbsp;&nbsp;mkdir bin etc include lib sbin share src
+&nbsp;&nbsp;&nbsp;&nbsp;ln -s share/man
+&nbsp;&nbsp;&nbsp;&nbsp;ln -s share/doc
+&nbsp;&nbsp;&nbsp;&nbsp;ln -s share/info
+&nbsp;&nbsp;&nbsp;&nbsp;cd $dirname/share
+&nbsp;&nbsp;&nbsp;&nbsp;mkdir dict doc info locale man nls misc terminfo zoneinfo
+&nbsp;&nbsp;&nbsp;&nbsp;cd $dirname/share/man
+&nbsp;&nbsp;&nbsp;&nbsp;mkdir man{1,2,3,4,5,6,7,8}
 done &amp;&amp;
 cd $LFS/var &amp;&amp;
 mkdir -p lock log mail run spool tmp opt cache lib/misc local &amp;&amp;

+ 2 - 2
chapter05/fileutils-exp.xml

@@ -7,8 +7,8 @@ change.</para>
 
 <para><userinput>cp lib/Makefile.in lib/Makefile.in.backup &amp;&amp;
 sed -e 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \
-&nbsp;&nbsp;&nbsp;-e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \
-&nbsp;&nbsp;&nbsp;lib/Makefile.in.backup &gt; lib/Makefile.in:</userinput>
+&nbsp;&nbsp;&nbsp;&nbsp;-e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \
+&nbsp;&nbsp;&nbsp;&nbsp;lib/Makefile.in.backup &gt; lib/Makefile.in:</userinput>
 This is used to fix a problem with building fileutils statically on glibc 2.2.3 
 systems.  If this isn't done, then there is the possibility of all of the 
 fileutils programs causing segmentation faults once chroot is entered 

+ 4 - 5
chapter05/fileutils-inst.xml

@@ -23,17 +23,16 @@ than likely result in all kinds of compile time problems.</para>
 
 <para><screen><userinput>cp lib/Makefile.in lib/Makefile.in.backup &amp;&amp;
 sed -e 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \
-&nbsp;&nbsp;&nbsp;-e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \
-&nbsp;&nbsp;&nbsp;lib/Makefile.in.backup &gt; lib/Makefile.in</userinput></screen></para>
+&nbsp;&nbsp;&nbsp;&nbsp;-e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \
+&nbsp;&nbsp;&nbsp;&nbsp;lib/Makefile.in.backup &gt; lib/Makefile.in</userinput></screen></para>
 
 <para>Install Fileutils by running the following commands:</para>
 
 <para><screen><userinput>./configure --disable-nls \
-&nbsp;&nbsp;&nbsp;--prefix=$LFS/usr --bindir=$LFS/bin &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--prefix=$LFS/usr --bindir=$LFS/bin &amp;&amp;
 make LDFLAGS=-static &amp;&amp;
 make install &amp;&amp;
-cd $LFS/usr/bin &amp;&amp;
-ln -sf ../../bin/install</userinput></screen></para>
+ln -sf ../../bin/install $LFS/usr/bin</userinput></screen></para>
 
 <para>Once you have installed Fileutils, you can test whether the
 segmentation fault problem has been avoided by running

+ 2 - 2
chapter05/gawk-inst.xml

@@ -16,10 +16,10 @@ class="directory">/usr/bin</filename> it'll run <userinput>rm -rf
 <para><screen><userinput>cp awklib/Makefile.in awklib/Makefile.in.backup &amp;&amp;
 sed -e '/^datadir/s/awk/gawk/' \
 -e '/^libexecdir/s%/awk%%' awklib/Makefile.in.backup \
-&nbsp;&nbsp;&nbsp;&gt; awklib/Makefile.in &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;&gt; awklib/Makefile.in &amp;&amp;
 CPPFLAGS=-Dre_max_failures=re_max_failures2 \
 ./configure --prefix=$LFS/usr --disable-nls \
-&nbsp;&nbsp;&nbsp;--libexecdir=$LFS/usr/bin &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=$LFS/usr/bin &amp;&amp;
 make LDFLAGS=-static &amp;&amp;
 make install</userinput></screen></para>
 

+ 3 - 6
chapter05/gcc-inst.xml

@@ -21,12 +21,9 @@ cd ../gcc-build &amp;&amp;
 &nbsp;&nbsp;&nbsp;--disable-nls --disable-shared --enable-threads=posix &amp;&amp;
 make BOOT_LDFLAGS=-static bootstrap &amp;&amp;
 make prefix=$LFS/usr install &amp;&amp;
-cd $LFS/lib &amp;&amp;
-ln -sf ../usr/bin/cpp &amp;&amp;
-cd $LFS/usr/lib &amp;&amp;
-ln -sf ../bin/cpp &amp;&amp;
-cd $LFS/usr/bin &amp;&amp;
-ln -sf gcc cc &amp;&amp;
+ln -sf ../usr/bin/cpp $LFS/lib &amp;&amp;
+ln -sf ../bin/cpp $LFS/usr/lib &amp;&amp;
+ln -sf gcc $LFS/usr/bin/cc &amp;&amp;
 rmdir $LFS/usr/*-gnu/include &amp;&amp;
 rmdir $LFS/usr/*-gnu</userinput></screen></para>
 

+ 1 - 1
chapter05/grep-inst.xml

@@ -5,7 +5,7 @@
 
 <para><screen><userinput>CPPFLAGS=-Dre_max_failures=re_max_failures2 \
 ./configure --prefix=$LFS/usr --bindir=$LFS/bin \
-&nbsp;&nbsp;&nbsp;--disable-nls --disable-perl-regexp &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls --disable-perl-regexp &amp;&amp;
 make LDFLAGS=-static &amp;&amp;
 make install</userinput></screen></para>
 

+ 5 - 5
chapter05/shellutils-inst.xml

@@ -3,13 +3,13 @@
 
 <para>Install Sh-utils by running the following commands:</para>
 
-<para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls &amp;&amp;
+<para><screen><userinput>./configure --prefix=$LFS/usr \
+&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls &amp;&amp;
 make LDFLAGS=-static &amp;&amp;
 make install &amp;&amp;
-cd $LFS/usr/bin &amp;&amp;
-mv basename date echo false hostname $LFS/bin &amp;&amp;
-mv pwd sleep stty test true uname $LFS/bin &amp;&amp;
-mv chroot ../sbin</userinput></screen></para>
+mv $LFS/usr/bin/{basename,date,echo,false,hostname} $LFS/bin &amp;&amp;
+mv $LFS/usr/bin/{pwd,sleep,stty,test,true,uname} $LFS/bin &amp;&amp;
+mv $LFS/usr/bin/chroot $LFS/usr/sbin</userinput></screen></para>
 
 <para>During the make install stage you will see the following warning:</para>
 

+ 3 - 2
chapter05/tar-inst.xml

@@ -12,8 +12,9 @@ for gzip files).</para>
 
 <para>Install Tar by running the following commands:</para>
 
-<para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls \
-&nbsp;&nbsp;&nbsp;--libexecdir=$LFS/usr/bin --bindir=$LFS/bin &amp;&amp; 
+<para><screen><userinput>./configure --prefix=$LFS/usr \
+&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls --libexecdir=$LFS/usr/bin \
+&nbsp;&nbsp;&nbsp;&nbsp;--bindir=$LFS/bin &amp;&amp; 
 make LDFLAGS=-static &amp;&amp;
 make install</userinput></screen></para>
 

+ 2 - 1
chapter05/texinfo-inst.xml

@@ -3,7 +3,8 @@
 
 <para>Install Texinfo by running the following commands:</para>
 
-<para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls &amp;&amp;
+<para><screen><userinput>./configure --prefix=$LFS/usr \
+&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls &amp;&amp;
 make LDFLAGS=-static &amp;&amp;
 make install</userinput></screen></para>
 

+ 3 - 2
chapter05/textutils-inst.xml

@@ -3,10 +3,11 @@
 
 <para>Install Textutils by running the following commands:</para>
 
-<para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls &amp;&amp;
+<para><screen><userinput>./configure --prefix=$LFS/usr \
+&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls &amp;&amp;
 make LDFLAGS=-static &amp;&amp;
 make install &amp;&amp;
-mv $LFS/usr/bin/cat $LFS/usr/bin/head $LFS/bin</userinput></screen></para>
+mv $LFS/usr/bin/{cat,head} $LFS/bin</userinput></screen></para>
 
 </sect2>
 

+ 2 - 3
chapter06/bash-inst.xml

@@ -4,11 +4,10 @@
 <para>Install Bash by running the following commands:</para>
 
 <para><screen><userinput>./configure --prefix=/usr --with-curses \
-&nbsp;&nbsp;&nbsp;--bindir=/bin &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--bindir=/bin &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
-cd /bin &amp;&amp;
-ln -sf bash sh &amp;&amp;
+ln -sf bash /bin/sh &amp;&amp;
 exec /bin/bash --login</userinput></screen></para>
 
 </sect2>

+ 6 - 9
chapter06/bzip2-inst.xml

@@ -10,15 +10,12 @@ make PREFIX=/usr install &amp;&amp;
 cp bzip2-shared /bin/bzip2 &amp;&amp;
 ln -s libbz2.so.1.0 libbz2.so &amp;&amp;
 cp -a libbz2.so* /lib &amp;&amp;
-cd /usr/lib &amp;&amp;
-ln -sf ../../lib/libbz2.so &amp;&amp;
-cd /usr/bin &amp;&amp;
-rm bunzip2 bzcat bzip2 &amp;&amp;
-rm /bin/bzless /bin/bzmore &amp;&amp;
-mv bzip2recover bzless bzmore /bin &amp;&amp;
-cd /bin &amp;&amp;
-ln -sf bzip2 bunzip2 &amp;&amp;
-ln -sf bzip2 bzcat</userinput></screen></para>
+ln -sf ../../lib/libbz2.so $LFS/usr/lib&amp;&amp;
+rm /usr/bin/{bunzip2,bzcat,bzip2} &amp;&amp;
+rm /bin/{bzless,bzmore} &amp;&amp;
+mv /usr/bin/{bzip2recover,bzless,bzmore} /bin &amp;&amp;
+ln -sf bzip2 /bin/bunzip2 &amp;&amp;
+ln -sf bzip2 /bin/bzcat</userinput></screen></para>
 
 
 <para>Although it's not strictly a part of a basic LFS system it's worth

+ 3 - 4
chapter06/changingowner.xml

@@ -6,14 +6,13 @@
 all files and directories that were installed in chapter 5 back to root.
 Run the following commands to do so:</para>
 
-<para><screen><userinput>cd / &amp;&amp;
-chown 0.0 . proc &amp;&amp;
-chown -R 0.0 bin boot dev etc home lib mnt opt root sbin tmp usr var</userinput></screen></para>
+<para><screen><userinput>chown 0.0 / /proc &amp;&amp;
+chown -R 0.0 /{bin,boot,dev,etc,home,lib,mnt,opt,root,sbin,tmp,usr,var}</userinput></screen></para>
 
 <para>Depending on the filesystem you created on the LFS partition, you may
 have a /lost+found directory. If so, run:</para>
 
-<para><screen><userinput>chown 0.0 lost+found</userinput></screen></para>
+<para><screen><userinput>chown 0.0 /lost+found</userinput></screen></para>
 
 <para>These commands will change the ownership of the root partition and
 the <filename>/proc</filename> directory to root, plus everything under

+ 0 - 7
chapter06/chroot.xml

@@ -19,13 +19,6 @@ chroot to the same value as outside chroot which is needed for programs
 like vim and less to operate properly. If you need other variables
 present, such as CFLAGS or CXXFLAGS, you need to set them again.</para>
 
-<para>The reason we do <userinput>cd $LFS</userinput> before running the
-<userinput>chroot</userinput> command is that older sh-utils packages 
-have a chroot program which doesn't do the cd by itself, therefore
-meaning that we have to perform it manually.  While this isn't an issue 
-with most modern distributions, it does no harm anyways and ensures that 
-the command works for everyone.</para>
-
 <para>Now that we are inside a chroot'ed environment, we can continue to
 install all the basic system software. You have to make sure all the
 following commands in this and following chapters are run from within the 

+ 2 - 3
chapter06/chrootcmd.xml

@@ -1,3 +1,2 @@
-<userinput>cd $LFS &amp;&amp;
-chroot $LFS /usr/bin/env -i HOME=/root \
-&nbsp;&nbsp;&nbsp;TERM=$TERM /bin/bash --login</userinput>
+<userinput>chroot $LFS /usr/bin/env -i HOME=/root \
+&nbsp;&nbsp;&nbsp;&nbsp;TERM=$TERM /bin/bash --login</userinput>

+ 3 - 4
chapter06/config-glibc.xml

@@ -38,19 +38,18 @@ location of the needed timezone file.</para>
 <para> Create the <filename class="directory">/etc/localtime</filename> symlink
 by running:</para>
 
-<para><screen><userinput>cd /etc &amp;&amp;
-ln -sf ../usr/share/zoneinfo/&lt;tzselect's output&gt; localtime</userinput></screen></para>
+<para><screen><userinput>ln -sf ../usr/share/zoneinfo/&lt;tzselect's output&gt; /etc/localtime</userinput></screen></para>
 
 <para>tzselect's output can be something like <emphasis>EST5EDT</emphasis> or
 <emphasis>Canada/Eastern</emphasis>.</para>
 
 <para>The symlink you'd create with that information would be:</para>
 
-<para><screen><userinput>ln -sf ../usr/share/zoneinfo/EST5EDT localtime</userinput></screen></para>
+<para><screen><userinput>ln -sf ../usr/share/zoneinfo/EST5EDT /etc/localtime</userinput></screen></para>
 
 <para>Or:</para>
 
-<para><screen><userinput>ln -sf ../usr/share/zoneinfo/Canada/Eastern localtime </userinput></screen></para>
+<para><screen><userinput>ln -sf ../usr/share/zoneinfo/Canada/Eastern /etc/localtime </userinput></screen></para>
 
 </sect2>
 

+ 3 - 4
chapter06/config-keyboard.xml

@@ -8,13 +8,12 @@ section. The US keymap file is the default if you don't change it.</para>
 <filename class="symlink">/usr/share/kbd/keymaps/defkeymap.map.gz</filename>
 symlink by running the following commands:</para>
 
-<para><screen><userinput>cd /usr/share/kbd/keymaps &amp;&amp;
-ln -s &lt;path/to/keymap&gt; defkeymap.map.gz</userinput></screen></para>
+<para><screen><userinput>ln -s &lt;path/to/keymap&gt; /usr/share/kbd/keymaps/defkeymap.map.gz</userinput></screen></para>
 
 <para>Replace &lt;path/to/keymap&gt; with the your keyboard's map file. For
 example, if you have a Dutch keyboard, you would run:</para>
 
-<para><screen><userinput>ln -s i386/qwerty/nl.map.gz defkeymap.map.gz</userinput></screen></para>
+<para><screen><userinput>ln -s i386/qwerty/nl.map.gz /usr/share/kbd/keymaps/defkeymap.map.gz</userinput></screen></para>
 
 <para>An second option to configure your keyboard's layout is to compile
 the keymap directly into the kernel. This will make sure that your
@@ -30,7 +29,7 @@ you, so skip the next command.</para>
 <para>Run the following commands to accomplish that:</para>
 
 <para><screen><userinput>loadkeys -m /usr/share/kbd/keymaps/defkeymap.map.gz &gt; \
-&nbsp;&nbsp;&nbsp;/usr/src/linux/drivers/char/defkeymap.c</userinput></screen></para>
+&nbsp;&nbsp;&nbsp;&nbsp;/usr/src/linux/drivers/char/defkeymap.c</userinput></screen></para>
 
 </sect2>
 

+ 1 - 1
chapter06/e2fsprogs-inst.xml

@@ -6,7 +6,7 @@
 <para><screen><userinput>mkdir ../e2fsprogs-build &amp;&amp;
 cd ../e2fsprogs-build &amp;&amp;
 ../e2fsprogs-&e2fsprogs-version;/configure --prefix=/usr --with-root-prefix="" \
-&nbsp;&nbsp;&nbsp;--enable-elf-shlibs &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--enable-elf-shlibs &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
 make install-libs &amp;&amp;

+ 3 - 3
chapter06/ed-inst.xml

@@ -10,9 +10,9 @@ days.</para>
 
 <para><screen><userinput>cp buf.c buf.c.backup &amp;&amp;
 sed 's/int u/int u, sfd/' buf.c.backup | \
-&nbsp;&nbsp;&nbsp;sed '/.*\*mktemp.*/d' | \
-&nbsp;&nbsp;&nbsp;sed 's/.*if (mktemp.*/  sfd = mkstemp(sfn);\
-&nbsp;&nbsp;&nbsp;if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL)/' &gt; buf.c &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;sed '/.*\*mktemp.*/d' | \
+&nbsp;&nbsp;&nbsp;&nbsp;sed 's/.*if (mktemp.*/  sfd = mkstemp(sfn);\
+&nbsp;&nbsp;&nbsp;&nbsp;if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL)/' &gt; buf.c &amp;&amp;
 ./configure --prefix=/usr &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;

+ 1 - 2
chapter06/fileutils-inst.xml

@@ -6,8 +6,7 @@
 <para><screen><userinput>./configure --prefix=/usr --bindir=/bin &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
-cd /usr/bin &amp;&amp;
-ln -sf ../../bin/install</userinput></screen></para>
+ln -sf ../../bin/install /usr/bin</userinput></screen></para>
 
 </sect2>
 

+ 1 - 1
chapter06/gawk-inst.xml

@@ -16,7 +16,7 @@ class="directory">/usr/bin</filename> it'll run <userinput>rm -rf
 <para><screen><userinput>cp awklib/Makefile.in awklib/Makefile.in.backup &amp;&amp;
 sed -e '/^datadir/s/awk/gawk/' \
 -e '/^libexecdir/s%/awk%%' awklib/Makefile.in.backup \
-&nbsp;&nbsp;&nbsp;&gt; awklib/Makefile.in &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;&gt; awklib/Makefile.in &amp;&amp;
 ./configure --prefix=/usr --libexecdir=/usr/bin &amp;&amp;
 make &amp;&amp;
 make install</userinput></screen></para>

+ 4 - 7
chapter06/gcc-inst.xml

@@ -26,15 +26,12 @@ who actively work on LFS.</para>
 mkdir ../gcc-build &amp;&amp;
 cd ../gcc-build &amp;&amp;
 ../gcc-&gcc-version;/configure --prefix=/usr --enable-shared \
-&nbsp;&nbsp;&nbsp;--enable-languages=c,c++ --enable-threads=posix &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--enable-languages=c,c++ --enable-threads=posix &amp;&amp;
 make bootstrap &amp;&amp;
 make install &amp;&amp;
-cd /lib &amp;&amp;
-ln -sf ../usr/bin/cpp &amp;&amp;
-cd /usr/lib &amp;&amp;
-ln -sf ../bin/cpp &amp;&amp;
-cd /usr/bin &amp;&amp;
-ln -sf gcc cc &amp;&amp;
+ln -sf ../usr/bin/cpp /lib &amp;&amp;
+ln -sf ../bin/cpp /usr/lib &amp;&amp;
+ln -sf gcc /usr/bin/cc &amp;&amp;
 rmdir /usr/*-gnu/include &amp;&amp;
 rmdir /usr/*-gnu</userinput></screen></para>
 

+ 3 - 2
chapter06/glibc-inst.xml

@@ -25,13 +25,14 @@ is putting your system at very high risk.</para>
 <para><screen><userinput>mknod -m 0666 /dev/null c 1 3 &amp;&amp;
 touch /etc/ld.so.conf &amp;&amp;
 cp malloc/Makefile malloc/Makefile.backup &amp;&amp;
-sed 's%\$(PERL)%/usr/bin/perl%' malloc/Makefile.backup &gt; malloc/Makefile &amp;&amp;
+sed 's%\$(PERL)%/usr/bin/perl%' \
+&nbsp;&nbsp;&nbsp;&nbsp;malloc/Makefile.backup &gt; malloc/Makefile &amp;&amp;
 cp login/Makefile login/Makefile.backup &amp;&amp;
 sed 's/root/0/' login/Makefile.backup &gt; login/Makefile &amp;&amp;
 mkdir ../glibc-build &amp;&amp;
 cd ../glibc-build &amp;&amp;
 ../glibc-&glibc-version;/configure --prefix=/usr \
-&nbsp;&nbsp;&nbsp;--enable-add-ons --libexecdir=/usr/bin &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--enable-add-ons --libexecdir=/usr/bin &amp;&amp;
 echo "cross-compiling = no" &gt; configparms &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;

+ 3 - 4
chapter06/groff-inst.xml

@@ -6,10 +6,9 @@
 <para><screen><userinput>./configure --prefix=/usr &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
-cd /usr/bin &amp;&amp;
-ln -s soelim zsoelim &amp;&amp;
-ln -s eqn geqn &amp;&amp;
-ln -s tbl gtbl</userinput></screen></para>
+ln -s soelim /usr/bin/zsoelim &amp;&amp;
+ln -s eqn /usr/bin/geqn &amp;&amp;
+ln -s tbl /usr/bin/gtbl</userinput></screen></para>
 
 </sect2>
 

+ 5 - 7
chapter06/gzip-inst.xml

@@ -8,13 +8,11 @@ cp gzexe.in gzexe.in.backup &amp;&amp;
 sed 's%"BINDIR"%/bin%' gzexe.in.backup &gt; gzexe.in &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
-cd /usr/bin &amp;&amp;
-mv gzip /bin &amp;&amp;
-rm gunzip zcat &amp;&amp;
-cd /bin &amp;&amp;
-ln -sf gzip gunzip &amp;&amp;
-ln -sf gzip zcat &amp;&amp;
-ln -sf gunzip uncompress</userinput></screen></para>
+mv /usr/bin/gzip /bin &amp;&amp;
+rm /usr/bin/{gunzip,zcat} &amp;&amp;
+ln -sf gzip /bin/gunzip &amp;&amp;
+ln -sf gzip /bin/zcat &amp;&amp;
+ln -sf gunzip /bin/uncompress</userinput></screen></para>
 
 </sect2>
 

+ 1 - 1
chapter06/ncurses-exp.xml

@@ -7,7 +7,7 @@ shared ncurses library files.</para>
 <para><userinput>--disable-termcap:</userinput> Disabled the compilation of
 termcap fall back support.</para>
 
-<para><userinput>cd /lib &amp;&amp; mv *.a /usr/lib :</userinput> This
+<para><userinput>mv /lib/*.a /usr/lib :</userinput> This
 moves all of the static ncurses library files from /lib to /usr/lib.
 /lib should only contain the shared files which are essential to the
 system when /usr may not be mounted.</para>

+ 9 - 11
chapter06/ncurses-inst.xml

@@ -4,18 +4,16 @@
 <para>Install Ncurses by running the following commands:</para>
 
 <para><screen><userinput>./configure --prefix=/usr --libdir=/lib \
-&nbsp;&nbsp;&nbsp;--with-shared --disable-termcap &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;--with-shared --disable-termcap &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
-cd /lib &amp;&amp;
-mv *.a /usr/lib &amp;&amp;
-chmod 755 *.5.2 &amp;&amp;
-cd /usr/lib &amp;&amp;
-ln -sf libncurses.a libcurses.a &amp;&amp;
-ln -sf ../../lib/libncurses.so &amp;&amp;
-ln -sf ../../lib/libcurses.so &amp;&amp;
-ln -sf ../../lib/libform.so &amp;&amp;
-ln -sf ../../lib/libpanel.so &amp;&amp;
-ln -sf ../../lib/libmenu.so</userinput></screen></para>
+mv /lib/*.a /usr/lib &amp;&amp;
+chmod 755 /lib/*.5.2 &amp;&amp;
+ln -sf libncurses.a /usr/lib/libcurses.a &amp;&amp;
+ln -sf ../../lib/libncurses.so /usr/lib &amp;&amp;
+ln -sf ../../lib/libcurses.so /usr/lib &amp;&amp;
+ln -sf ../../lib/libform.so /usr/lib &amp;&amp;
+ln -sf ../../lib/libpanel.so /usr/lib &amp;&amp;
+ln -sf ../../lib/libmenu.so /usr/lib</userinput></screen></para>
 </sect2>
 

+ 1 - 2
chapter06/netkitbase-inst.xml

@@ -6,8 +6,7 @@
 <para><screen><userinput>./configure &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
-cd etc.sample &amp;&amp;
-cp services protocols /etc</userinput></screen></para>
+cp etc.sample/{services,protocols} /etc</userinput></screen></para>
 
 <para>There are other files in the <filename
 class="directory">etc.sample</filename> directory which might be of

+ 1 - 1
chapter06/procps-inst.xml

@@ -4,7 +4,7 @@
 <para>Install Procps by running the following commands:</para>
 
 <para><screen><userinput>make &amp;&amp;
-make XSCPT='' install &amp;&amp;
+make XSCPT="" install &amp;&amp;
 mv /usr/bin/kill /bin</userinput></screen></para>
 
 </sect2>

+ 3 - 3
chapter06/psmisc-inst.xml

@@ -3,7 +3,8 @@
 
 <para>Install Psmisc by running the following commands:</para>
 
-<para><screen><userinput>./configure --prefix=/usr --exec-prefix=/ &amp;&amp;
+<para><screen><userinput>./configure --prefix=/usr \
+&nbsp;&nbsp;&nbsp;&nbsp;--exec-prefix=/ &amp;&amp;
 make &amp;&amp;
 make install</userinput></screen></para>
 
@@ -23,8 +24,7 @@ should remove Psmisc's pidof man page by running:</para>
 package's installation by creating the <filename>/bin/pidof</filename>
 symlink by running:</para>
 
-<para><screen><userinput>cd /bin
-ln -s killall pidof</userinput></screen></para>
+<para><screen><userinput>ln -s killall /bin/pidof</userinput></screen></para>
 
 </sect2>
 

+ 6 - 9
chapter06/shadowpwd-inst.xml

@@ -12,17 +12,14 @@ following commands:</para>
 <para><screen><userinput>./configure --prefix=/usr --enable-shared &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
-cd etc &amp;&amp;
-cp limits login.access /etc &amp;&amp;
-sed 's%/var/spool/mail%/var/mail%' login.defs.linux &gt; /etc/login.defs &amp;&amp;
-cd /usr/sbin &amp;&amp;
-ln -sf vipw vigr &amp;&amp;
+cp etc/{limits,login.access} /etc &amp;&amp;
+sed 's%/var/spool/mail%/var/mail%' \
+&nbsp;&nbsp;&nbsp;&nbsp;etc/login.defs.linux &gt; /etc/login.defs &amp;&amp;
+ln -sf vipw /usr/bin/vigr &amp;&amp;
 rm /bin/vipw &amp;&amp;
 mv /bin/sg /usr/bin &amp;&amp;
-cd /lib &amp;&amp;
-mv libmisc.*a libshadow.*a /usr/lib &amp;&amp;
-cd /usr/lib &amp;&amp;
-ln -s ../../lib/libshadow.so</userinput></screen></para>
+mv /lib/{libmisc.*a,libshadow.*a} /usr/lib &amp;&amp;
+ln -s ../../lib/libshadow.so /usr/lib</userinput></screen></para>
 
 </sect2>
 

+ 4 - 6
chapter06/shellutils-inst.xml

@@ -6,10 +6,9 @@
 <para><screen><userinput>./configure --prefix=/usr &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
-cd /usr/bin &amp;&amp;
-mv basename date echo false hostname /bin &amp;&amp;
-mv pwd sleep stty su test true uname /bin &amp;&amp;
-mv chroot ../sbin</userinput></screen></para>
+mv /usr/bin/{basename,date,echo,false,hostname} /bin &amp;&amp;
+mv /usr/bin/{pwd,sleep,stty,su,test,true,uname} /bin &amp;&amp;
+mv /usr/bin/chroot /usr/sbin</userinput></screen></para>
 
 </sect2>
 
@@ -23,8 +22,7 @@ are built into the bash interpreter, but the FHS dictates that there should be a
 <filename>[</filename> binary. We create that in this way, while still in the
 <filename class="directory">/bin</filename> directory:</para>
 
-<para><screen><userinput>cd /bin &amp;&amp;
-ln -sf test [</userinput></screen></para>
+<para><screen><userinput>ln -sf test /bin/[</userinput></screen></para>
 
 </sect2>
 

+ 1 - 1
chapter06/sysvinit-inst.xml

@@ -13,7 +13,7 @@ following commands. If you don't want to change it, skip it.</para>
 
 <para><screen><userinput>cp src/init.c src/init.c.backup &amp;&amp;
 sed 's/\(.*\)\(Sending processes\)\(.*\)/\1\2 started by init\3/' \
-&nbsp;&nbsp;&nbsp;src/init.c.backup &gt; src/init.c</userinput></screen></para>
+&nbsp;&nbsp;&nbsp;&nbsp;src/init.c.backup &gt; src/init.c</userinput></screen></para>
 
 <para>Install Sysvinit by running the following commands:</para>
 

+ 2 - 2
chapter06/tar-inst.xml

@@ -14,8 +14,8 @@ for gzip files).</para>
 <para>Install Tar by running the following commands from the toplevel
 directory:</para>
 
-<para><screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin \
-&nbsp;&nbsp;&nbsp;--bindir=/bin &amp;&amp;
+<para><screen><userinput>./configure --prefix=/usr \
+&nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin --bindir=/bin &amp;&amp;
 make &amp;&amp;
 make install</userinput></screen></para>
 

+ 1 - 1
chapter06/textutils-inst.xml

@@ -6,7 +6,7 @@
 <para><screen><userinput>./configure --prefix=/usr &amp;&amp;
 make &amp;&amp;
 make install &amp;&amp;
-mv /usr/bin/cat /usr/bin/head /bin</userinput></screen></para>
+mv /usr/bin/{cat,head} /bin</userinput></screen></para>
 
 </sect2>
 

+ 1 - 1
chapter06/utillinux-inst.xml

@@ -7,7 +7,7 @@ util-linux package, FHS-compliant, run the following.</para>
 
 <para><screen><userinput>cp hwclock/hwclock.c hwclock/hwclock.c.backup &amp;&amp;
 sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \
-&nbsp;&nbsp;&nbsp;hwclock/hwclock.c.backup &gt; hwclock/hwclock.c &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;hwclock/hwclock.c.backup &gt; hwclock/hwclock.c &amp;&amp;
 mkdir -p /var/lib/hwclock</userinput></screen></para>
 
 </sect2>

+ 2 - 4
chapter06/vim-inst.xml

@@ -12,8 +12,7 @@ which are currently available are for Emacs, Joe and nano.</para>
 <para><screen><userinput>./configure --prefix=/usr &amp;&amp;
 make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\" &amp;&amp;
 make install &amp;&amp;
-cd /usr/bin &amp;&amp;
-ln -sf vim vi</userinput></screen></para>
+ln -sf vim /usr/bin/vi</userinput></screen></para>
 
 <para>If you plan on installing the X Window system on your LFS
 system, you might want to re-compile Vim after you have installed X. Vim
@@ -34,8 +33,7 @@ instead of the one presented above:</para>
 <para><screen><userinput>./configure --prefix=/usr --localstatedir=/var/lib/vim &amp;&amp;
 make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\" &amp;&amp;
 make install &amp;&amp;
-cd /usr/bin &amp;&amp;
-ln -sf vim vi</userinput></screen></para>
+ln -sf vim /usr/bin/vi</userinput></screen></para>
 
 </sect2>