[Bug 127] Clean up ln, mv and cp commands

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1011 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Mark Hymers 2001-08-23 22:38:49 +00:00
parent b58a7ebf15
commit 45714a7d3b
40 changed files with 104 additions and 132 deletions

View File

@ -16,7 +16,7 @@ partition which has to be mounted at some point. Before that partition is
mounted a user needs and will want to have bash available (it will be hard to mounted a user needs and will want to have bash available (it will be hard to
execute the boot scripts without a shell for instance).</para> execute the boot scripts without a shell for instance).</para>
<para><userinput>ln -s bash sh:</userinput> This command creates the sh <para><userinput>ln -sf bash sh:</userinput> This command creates the sh
symlink that points to bash. Most scripts run themselves via '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 (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 invokes a special bash mode. Bash will then behave (as closely as

View File

@ -8,7 +8,7 @@
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>cd $LFS/bin &amp;&amp;</userinput> <userinput>cd $LFS/bin &amp;&amp;</userinput>
<userinput>ln -s bash sh</userinput></screen></para> <userinput>ln -sf bash sh</userinput></screen></para>
<para>If the make install phase ends with something along the lines of</para> <para>If the make install phase ends with something along the lines of</para>
@ -28,7 +28,7 @@ old version of the texinfo package. This error is not severe by any means: the
info pages will be installed when we recompile bash dynamically in info pages will be installed when we recompile bash dynamically in
chapter 6, so you can ignore it. You do, however, have to run the last chapter 6, so you can ignore it. You do, however, have to run the last
two commands manually (the <userinput>cd $LFS/bin</userinput> and two commands manually (the <userinput>cd $LFS/bin</userinput> and
<userinput>ln -s bash sh</userinput> commands) because they won't be <userinput>ln -sf bash sh</userinput> commands) because they won't be
executed when the error occurs.</para> executed when the error occurs.</para>
</sect2> </sect2>

View File

@ -1,34 +1,6 @@
<sect2> <sect2>
<title>Command explanations</title> <title>Command explanations</title>
<!--
<para><userinput>sed: </userinput> The sed command here searches for the
string "$(CC) $(CFLAGS) -o" and replaces it by "$(CC) $(CFLAGS)
$(LDFLAGS) -o" in the Makefile file. We make that modification so it
will be easier to link bzip2 statically.</para>
<para><userinput>...Makefile | make -f -:</userinput> Makefile
is the last parameter of the sed command which indicates the file to
search and replace in. Sed normally sends the modified file to stdout
(standard output), which will be the console. With the construction we
use, sed's output will be piped to the make program. Normally, when make
is started, it tries to find a number of files like Makefile. But we have
modified the Makefile file so we don't want make to use it. The "-f -"
parameter tells make to read it's input from another file, or from stdin
(standard input) which the dash (-) implies. This is one way to do it.
Another way would be to have sed write the output to a different file
and tell make with the -f parameter to read that alternate file.</para>
<para><userinput>LDFLAGS=-static:</userinput> This is the second way we use to
link a package statically. This is also the most common way.
The -all-static value is only used with the binutils package and won't
be used throughout the rest of this book.</para>
I HAVEN'T REMOVED THIS AS WE MAY NEED TO COPY SOME OF IT TO A LATER
PACKAGE. IS THIS THE CASE?
-->
<para><userinput>make CC="gcc -static": </userinput>This is the method <para><userinput>make CC="gcc -static": </userinput>This is the method
we use to tell gcc that we want bzip2 to be linked statically.</para> we use to tell gcc that we want bzip2 to be linked statically.</para>

View File

@ -6,7 +6,7 @@
<para><screen><userinput>make CC="gcc -static" &amp;&amp;</userinput> <para><screen><userinput>make CC="gcc -static" &amp;&amp;</userinput>
<userinput>make PREFIX=$LFS/usr install &amp;&amp;</userinput> <userinput>make PREFIX=$LFS/usr install &amp;&amp;</userinput>
<userinput>cd $LFS/usr/bin &amp;&amp;</userinput> <userinput>cd $LFS/usr/bin &amp;&amp;</userinput>
<userinput>mv bzcat bunzip2 bzip2 bzip2recover $LFS/bin</userinput></screen></para> <userinput>mv -f bzcat bunzip2 bzip2 bzip2recover $LFS/bin</userinput></screen></para>
</sect2> </sect2>

View File

@ -2,13 +2,13 @@
<title>Command explanations</title> <title>Command explanations</title>
<para><screen><userinput>sed 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \</userinput> <para><screen><userinput>sed 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \</userinput>
<userinput> lib/Makefile.in &gt; tmp &amp;&amp;</userinput> <userinput>&nbsp;&nbsp;&nbsp;lib/Makefile.in &gt; tmp &amp;&amp;</userinput>
<userinput>sed 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \</userinput> <userinput>sed 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \</userinput>
<userinput> tmp &gt; lib/Makefile.in : </userinput></screen> This is used <userinput>&nbsp;&nbsp;&nbsp;tmp &gt; lib/Makefile.in : </userinput></screen> This
to fix a problem with building fileutils statically on glibc 2.2.3 systems. If is used to fix a problem with building fileutils statically on glibc 2.2.3
this isn't done, then there is the possibility of all of the fileutils systems. If this isn't done, then there is the possibility of all of the
programs causing segmentation faults once chroot is entered in chapter fileutils programs causing segmentation faults once chroot is entered
6.</para> in chapter 6.</para>
<para><userinput>--libexecdir=$LFS/bin:</userinput> This configure option will <para><userinput>--libexecdir=$LFS/bin:</userinput> This configure option will
set the program executable directory to $LFS/bin. This is normally set set the program executable directory to $LFS/bin. This is normally set

View File

@ -7,9 +7,9 @@ segmentation faults once we enter chroot in Chapter 6. The sed commands for
those using glibc-2.2.3 are: those using glibc-2.2.3 are:
<screen><userinput>sed 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \</userinput> <screen><userinput>sed 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \</userinput>
<userinput> lib/Makefile.in &gt; tmp &amp;&amp;</userinput> <userinput>&nbsp;&nbsp;&nbsp;lib/Makefile.in &gt; tmp &amp;&amp;</userinput>
<userinput>sed 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \</userinput> <userinput>sed 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \</userinput>
<userinput> tmp &gt; lib/Makefile.in</userinput></screen></para> <userinput>&nbsp;&nbsp;&nbsp;tmp &gt; lib/Makefile.in</userinput></screen></para>
<para>Install fileutils by running the following commands: <para>Install fileutils by running the following commands:
<screen><userinput>./configure --disable-nls \</userinput> <screen><userinput>./configure --disable-nls \</userinput>
@ -17,7 +17,7 @@ those using glibc-2.2.3 are:
<userinput>make LDFLAGS=-static &amp;&amp;</userinput> <userinput>make LDFLAGS=-static &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>cd $LFS/usr/bin &amp;&amp;</userinput> <userinput>cd $LFS/usr/bin &amp;&amp;</userinput>
<userinput>ln -s ../../bin/install</userinput></screen></para> <userinput>ln -sf ../../bin/install</userinput></screen></para>
<para>Once you have installed fileutils, you can test whether the <para>Once you have installed fileutils, you can test whether the
segmentation fault problem has been avoided by running segmentation fault problem has been avoided by running

View File

@ -16,11 +16,11 @@ and C++ compilers and not the other available compilers as they are, on
the average, not often used. If those other compilers are needed, the average, not often used. If those other compilers are needed,
the --enable-languages parameter can be omitted.</para> the --enable-languages parameter can be omitted.</para>
<para><userinput>ln -s ../usr/bin/cpp:</userinput> This <para><userinput>ln -sf ../usr/bin/cpp:</userinput> This
creates the $LFS/lib/cpp symlink. Some packages explicitly try to find creates the $LFS/lib/cpp symlink. Some packages explicitly try to find
cpp in /lib.</para> cpp in /lib.</para>
<para><userinput>ln -s ../bin/cpp:</userinput> This <para><userinput>ln -sf ../bin/cpp:</userinput> This
creates the $LFS/usr/lib/cpp symlink as there are packages that expect creates the $LFS/usr/lib/cpp symlink as there are packages that expect
cpp to be in /usr/lib.</para> cpp to be in /usr/lib.</para>

View File

@ -12,11 +12,11 @@
<userinput>make -e LDFLAGS=-static bootstrap &amp;&amp;</userinput> <userinput>make -e LDFLAGS=-static bootstrap &amp;&amp;</userinput>
<userinput>make prefix=$LFS/usr install &amp;&amp;</userinput> <userinput>make prefix=$LFS/usr install &amp;&amp;</userinput>
<userinput>cd $LFS/lib &amp;&amp;</userinput> <userinput>cd $LFS/lib &amp;&amp;</userinput>
<userinput>ln -s ../usr/bin/cpp &amp;&amp;</userinput> <userinput>ln -sf ../usr/bin/cpp &amp;&amp;</userinput>
<userinput>cd $LFS/usr/lib &amp;&amp;</userinput> <userinput>cd $LFS/usr/lib &amp;&amp;</userinput>
<userinput>ln -s ../bin/cpp &amp;&amp;</userinput> <userinput>ln -sf ../bin/cpp &amp;&amp;</userinput>
<userinput>cd $LFS/usr/bin &amp;&amp;</userinput> <userinput>cd $LFS/usr/bin &amp;&amp;</userinput>
<userinput>ln -s gcc cc</userinput></screen></para> <userinput>ln -sf gcc cc</userinput></screen></para>
</sect2> </sect2>

View File

@ -8,8 +8,8 @@ unpacked.</para>
<userinput>./configure --prefix=$LFS/usr &amp;&amp;</userinput> <userinput>./configure --prefix=$LFS/usr &amp;&amp;</userinput>
<userinput>make LDFLAGS=-static &amp;&amp;</userinput> <userinput>make LDFLAGS=-static &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>cp $LFS/usr/bin/gunzip $LFS/usr/bin/gzip $LFS/bin &amp;&amp;</userinput> <userinput>cp -f $LFS/usr/bin/gunzip $LFS/usr/bin/gzip $LFS/bin &amp;&amp;</userinput>
<userinput>rm $LFS/usr/bin/gunzip $LFS/usr/bin/gzip</userinput></screen></para> <userinput>rm -f $LFS/usr/bin/gunzip $LFS/usr/bin/gzip</userinput></screen></para>
</sect2> </sect2>

View File

@ -20,13 +20,13 @@ checks, but what we do care about is that make dep creates those
aforementioned files in $LFS/usr/src/linux/include/linux we will be aforementioned files in $LFS/usr/src/linux/include/linux we will be
needing later on.</para> needing later on.</para>
<para><userinput>cp -a ../src/linux/include/linux .</userinput> and <para><userinput>cp -af ../src/linux/include/linux .</userinput> and
<userinput>mkdir asm &amp;&amp; cp -a ../src/linux/include/asm/* .</userinput>: <userinput>mkdir asm &amp;&amp; cp -af ../src/linux/include/asm/* .</userinput>:
These commands copy the kernel headers in the These commands copy the kernel headers in the
<filename>$LFS/usr/include</filename> directory.</para> <filename>$LFS/usr/include</filename> directory.</para>
<para><userinput>chown root.root $LFS/usr/include/linux -R </userinput> and <para><userinput>chown -R root.root $LFS/usr/include/linux</userinput> and
<userinput>chown root.root $LFS/usr/include/asm -R </userinput>: <userinput>chown -R root.root $LFS/usr/include/asm</userinput>:
These commands change the ownership of the These commands change the ownership of the
<filename>$LFS/usr/include/linux</filename> and the <filename>$LFS/usr/include/linux</filename> and the
<filename>$LFS/usr/include/asm</filename> directories, plus all the <filename>$LFS/usr/include/asm</filename> directories, plus all the

View File

@ -14,10 +14,10 @@ command:</para>
<userinput>yes "" | make config &amp;&amp;</userinput> <userinput>yes "" | make config &amp;&amp;</userinput>
<userinput>make dep &amp;&amp;</userinput> <userinput>make dep &amp;&amp;</userinput>
<userinput>cd $LFS/usr/include &amp;&amp;</userinput> <userinput>cd $LFS/usr/include &amp;&amp;</userinput>
<userinput>cp -a ../src/linux/include/linux . &amp;&amp;</userinput> <userinput>cp -af ../src/linux/include/linux . &amp;&amp;</userinput>
<userinput>chown -R root.root $LFS/usr/include/linux &amp;&amp;</userinput> <userinput>chown -R root.root $LFS/usr/include/linux &amp;&amp;</userinput>
<userinput>mkdir asm &amp;&amp;</userinput> <userinput>mkdir asm &amp;&amp;</userinput>
<userinput>cp -a ../src/linux/include/asm/* asm &amp;&amp;</userinput> <userinput>cp -af ../src/linux/include/asm/* asm &amp;&amp;</userinput>
<userinput>chown -R root.root $LFS/usr/include/asm</userinput></screen></para> <userinput>chown -R root.root $LFS/usr/include/asm</userinput></screen></para>
</sect2> </sect2>

View File

@ -13,7 +13,7 @@ normal Linux system uses by simply executing the library, like this:</para>
interesting information. If you have Glibc-2.0.x installed on your starting interesting information. If you have Glibc-2.0.x installed on your starting
distribution, copy the NSS library files by running:</para> distribution, copy the NSS library files by running:</para>
<para><screen><userinput>cp -av /lib/libnss* $LFS/lib</userinput></screen></para> <para><screen><userinput>cp -afv /lib/libnss* $LFS/lib</userinput></screen></para>
</sect1> </sect1>

View File

@ -9,8 +9,8 @@ to be unpacked.</para>
<userinput>make LDFLAGS=-static &amp;&amp;</userinput> <userinput>make LDFLAGS=-static &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>cd $LFS/usr/bin &amp;&amp;</userinput> <userinput>cd $LFS/usr/bin &amp;&amp;</userinput>
<userinput>mv date echo false pwd stty $LFS/bin &amp;&amp;</userinput> <userinput>mv -f date echo false pwd stty $LFS/bin &amp;&amp;</userinput>
<userinput>mv su true uname hostname $LFS/bin</userinput></screen></para> <userinput>mv -f su true uname hostname $LFS/bin</userinput></screen></para>
</sect2> </sect2>

View File

@ -6,7 +6,7 @@
<para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls &amp;&amp;</userinput> <para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls &amp;&amp;</userinput>
<userinput>make LDFLAGS=-static &amp;&amp;</userinput> <userinput>make LDFLAGS=-static &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>mv $LFS/usr/bin/cat $LFS/bin</userinput></screen></para> <userinput>mv -f $LFS/usr/bin/cat $LFS/bin</userinput></screen></para>
</sect2> </sect2>

View File

@ -7,7 +7,7 @@
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>logout</userinput> <userinput>logout</userinput>
<userinput>mv $LFS/usr/bin/bash $LFS/usr/bin/bashbug $LFS/bin &amp;&amp;</userinput> <userinput>mv -f $LFS/usr/bin/bash $LFS/usr/bin/bashbug $LFS/bin &amp;&amp;</userinput>
&c6-chrootcmd;</screen></para> &c6-chrootcmd;</screen></para>
<para>The static bash is replaced with the dynamic bash after we exit <para>The static bash is replaced with the dynamic bash after we exit

View File

@ -5,19 +5,19 @@
<para><screen><userinput>make -f Makefile-libbz2_so &amp;&amp;</userinput> <para><screen><userinput>make -f Makefile-libbz2_so &amp;&amp;</userinput>
<userinput>make bzip2recover libbz2.a &amp;&amp;</userinput> <userinput>make bzip2recover libbz2.a &amp;&amp;</userinput>
<userinput>cp bzip2-shared /bin/bzip2 &amp;&amp;</userinput> <userinput>cp -f bzip2-shared /bin/bzip2 &amp;&amp;</userinput>
<userinput>cp bzip2recover /bin &amp;&amp;</userinput> <userinput>cp -f bzip2recover /bin &amp;&amp;</userinput>
<userinput>cp bzip2.1 /usr/share/man/man1 &amp;&amp;</userinput> <userinput>cp -f bzip2.1 /usr/share/man/man1 &amp;&amp;</userinput>
<userinput>cp bzlib.h /usr/include &amp;&amp;</userinput> <userinput>cp -f bzlib.h /usr/include &amp;&amp;</userinput>
<userinput>cp -a libbz2.so* libbz2.a /lib &amp;&amp;</userinput> <userinput>cp -af libbz2.so* libbz2.a /lib &amp;&amp;</userinput>
<userinput>rm /usr/lib/libbz2.a &amp;&amp;</userinput> <userinput>rm -f /usr/lib/libbz2.a &amp;&amp;</userinput>
<userinput>cd /bin &amp;&amp;</userinput> <userinput>cd /bin &amp;&amp;</userinput>
<userinput>ln -sf bzip2 bunzip2 &amp;&amp;</userinput> <userinput>ln -sf bzip2 bunzip2 &amp;&amp;</userinput>
<userinput>ln -sf bzip2 bzcat &amp;&amp;</userinput> <userinput>ln -sf bzip2 bzcat &amp;&amp;</userinput>
<userinput>cd /usr/share/man/man1 &amp;&amp;</userinput> <userinput>cd /usr/share/man/man1 &amp;&amp;</userinput>
<userinput>ln -s bzip2.1 bunzip2.1 &amp;&amp;</userinput> <userinput>ln -sf bzip2.1 bunzip2.1 &amp;&amp;</userinput>
<userinput>ln -s bzip2.1 bzcat.1 &amp;&amp;</userinput> <userinput>ln -sf bzip2.1 bzcat.1 &amp;&amp;</userinput>
<userinput>ln -s bzip2.1 bzip2recover.1</userinput></screen></para> <userinput>ln -sf bzip2.1 bzip2recover.1</userinput></screen></para>
<para>Although it's not strictly a part of a basic LFS system it's worth <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 mentioning that a patch for Tar can be downloaded which enables the tar

View File

@ -11,7 +11,7 @@ to be like that. We did not forget to supply a value there.</para>
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>make install-libs &amp;&amp;</userinput> <userinput>make install-libs &amp;&amp;</userinput>
<userinput>mv /usr/sbin/mklost+found /sbin</userinput></screen></para> <userinput>mv -f /usr/sbin/mklost+found /sbin</userinput></screen></para>
</sect2> </sect2>

View File

@ -11,7 +11,7 @@
<userinput>./configure --prefix=/usr &amp;&amp;</userinput> <userinput>./configure --prefix=/usr &amp;&amp;</userinput>
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>mv /usr/bin/ed /usr/bin/red /bin</userinput></screen></para> <userinput>mv -f /usr/bin/ed /usr/bin/red /bin</userinput></screen></para>
</sect2> </sect2>

View File

@ -7,7 +7,7 @@
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>cd /usr/bin &amp;&amp;</userinput> <userinput>cd /usr/bin &amp;&amp;</userinput>
<userinput>ln -s flex lex</userinput></screen></para> <userinput>ln -sf flex lex</userinput></screen></para>
</sect2> </sect2>

View File

@ -21,7 +21,7 @@ file <filename>tmp~</filename>. This is done because Glibc can't
autodetect perl since it's not installed yet at the time when we install autodetect perl since it's not installed yet at the time when we install
Glibc.</para> Glibc.</para>
<para><userinput>mv tmp~ ../glibc-&glibc-version;/malloc/Makefile:</userinput> The file <para><userinput>mv -f tmp~ ../glibc-&glibc-version;/malloc/Makefile:</userinput> The file
<filename>tmp~</filename> is now moved back to <filename>tmp~</filename> is now moved back to
<filename>../glibc-&glibc-version;/malloc/Makefile</filename>. We do this because <filename>../glibc-&glibc-version;/malloc/Makefile</filename>. We do this because
when using sed, we can't write straight back to this file so we need to when using sed, we can't write straight back to this file so we need to
@ -35,7 +35,7 @@ because as we don't have glibc on the LFS system yet, usernames can't
be resolved to their user id's. Therefore, we replace the username be resolved to their user id's. Therefore, we replace the username
root with the id 0. </para> root with the id 0. </para>
<para><userinput>mv tmp~ ../glibc-&glibc-version;/login/Makefile:</userinput> Asabove, we are using a temporary file (<filename>tmp~</filename>) to store the <para><userinput>mv -f tmp~ ../glibc-&glibc-version;/login/Makefile:</userinput> Asabove, we are using a temporary file (<filename>tmp~</filename>) to store the
edited Makefile and then copying it back over the original.</para> edited Makefile and then copying it back over the original.</para>
<para><userinput>--enable-add-ons:</userinput> This enables the add-on that <para><userinput>--enable-add-ons:</userinput> This enables the add-on that
@ -52,7 +52,7 @@ test program to determine this, so it automatically defaults to a
cross-compiler. The reason for the failed program is because Glibc cross-compiler. The reason for the failed program is because Glibc
hasn't been installed yet.</para> hasn't been installed yet.</para>
<para><userinput>mv config.make~ config.make:</userinput> Again, we are moving <para><userinput>mv -f config.make~ config.make:</userinput> Again, we are moving
the temporary file over the original.</para> the temporary file over the original.</para>
</sect2> </sect2>

View File

@ -14,15 +14,15 @@ would do.</para>
<userinput>cd ../glibc-build &amp;&amp;</userinput> <userinput>cd ../glibc-build &amp;&amp;</userinput>
<userinput>sed 's|$(PERL)|/usr/bin/perl|' \</userinput> <userinput>sed 's|$(PERL)|/usr/bin/perl|' \</userinput>
<userinput>&nbsp;&nbsp;&nbsp;../glibc-&glibc-version;/malloc/Makefile &gt; tmp~ &amp;&amp;</userinput> <userinput>&nbsp;&nbsp;&nbsp;../glibc-&glibc-version;/malloc/Makefile &gt; tmp~ &amp;&amp;</userinput>
<userinput>mv tmp~ ../glibc-&glibc-version;/malloc/Makefile &amp;&amp;</userinput> <userinput>mv -f tmp~ ../glibc-&glibc-version;/malloc/Makefile &amp;&amp;</userinput>
<userinput>sed 's/root/0/' ../glibc-&glibc-version;/login/Makefile &gt; tmp~ &amp;&amp;</userinput> <userinput>sed 's/root/0/' ../glibc-&glibc-version;/login/Makefile &gt; tmp~ &amp;&amp;</userinput>
<userinput>mv tmp~ ../glibc-&glibc-version;/login/Makefile &amp;&amp;</userinput> <userinput>mv -f tmp~ ../glibc-&glibc-version;/login/Makefile &amp;&amp;</userinput>
<userinput>../glibc-&glibc-version;/configure \</userinput> <userinput>../glibc-&glibc-version;/configure \</userinput>
<userinput>&nbsp;&nbsp;&nbsp;--prefix=/usr --enable-add-ons \</userinput> <userinput>&nbsp;&nbsp;&nbsp;--prefix=/usr --enable-add-ons \</userinput>
<userinput>&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin &amp;&amp;</userinput> <userinput>&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin &amp;&amp;</userinput>
<userinput>sed 's/cross-compiling = yes/cross-compiling = no/' \</userinput> <userinput>sed 's/cross-compiling = yes/cross-compiling = no/' \</userinput>
<userinput>&nbsp;&nbsp;&nbsp;config.make &gt; config.make~ &amp;&amp;</userinput> <userinput>&nbsp;&nbsp;&nbsp;config.make &gt; config.make~ &amp;&amp;</userinput>
<userinput>mv config.make~ config.make &amp;&amp;</userinput> <userinput>mv -f config.make~ config.make &amp;&amp;</userinput>
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>make localedata/install-locales &amp;&amp;</userinput> <userinput>make localedata/install-locales &amp;&amp;</userinput>

View File

@ -7,13 +7,13 @@
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>cd /usr/bin &amp;&amp;</userinput> <userinput>cd /usr/bin &amp;&amp;</userinput>
<userinput>mv gzip /bin &amp;&amp;</userinput> <userinput>mv -f gzip /bin &amp;&amp;</userinput>
<userinput>rm gunzip zcat &amp;&amp;</userinput> <userinput>rm -f gunzip zcat &amp;&amp;</userinput>
<userinput>cd /bin &amp;&amp;</userinput> <userinput>cd /bin &amp;&amp;</userinput>
<userinput>ln -sf gzip gunzip &amp;&amp;</userinput> <userinput>ln -sf gzip gunzip &amp;&amp;</userinput>
<userinput>ln -s gzip zcat &amp;&amp;</userinput> <userinput>ln -sf gzip zcat &amp;&amp;</userinput>
<userinput>ln -s gzip compress &amp;&amp;</userinput> <userinput>ln -sf gzip compress &amp;&amp;</userinput>
<userinput>ln -s gunzip uncompress</userinput></screen></para> <userinput>ln -sf gunzip uncompress</userinput></screen></para>
</sect2> </sect2>

View File

@ -5,7 +5,7 @@
data files (fonts, keymaps, and such) in the /usr/share/kbd directory, as data files (fonts, keymaps, and such) in the /usr/share/kbd directory, as
the FHS suggests.</para> the FHS suggests.</para>
<para><userinput>rm <para><userinput>rm -f
/usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz:</userinput> We /usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz:</userinput> We
remove this file because we don't know which keymap you remove this file because we don't know which keymap you
need to use. We will be defining the default keymap in need to use. We will be defining the default keymap in

View File

@ -6,7 +6,7 @@
<para><screen><userinput>./configure --datadir=/usr/share/kbd &amp;&amp;</userinput> <para><screen><userinput>./configure --datadir=/usr/share/kbd &amp;&amp;</userinput>
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>rm /usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz</userinput></screen></para> <userinput>rm -f /usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz</userinput></screen></para>
</sect2> </sect2>

View File

@ -5,7 +5,7 @@
<para><screen><userinput>for i in configure src/Makefile.in src/makewhatis.sh</userinput> <para><screen><userinput>for i in configure src/Makefile.in src/makewhatis.sh</userinput>
<userinput>do sed s/gawk/awk/g $i &gt; $i.fixed</userinput> <userinput>do sed s/gawk/awk/g $i &gt; $i.fixed</userinput>
<userinput>mv $i.fixed $i</userinput> <userinput>mv -f $i.fixed $i</userinput>
<userinput>done</userinput> <userinput>done</userinput>
<userinput>chmod 700 configure &amp;&amp;</userinput> <userinput>chmod 700 configure &amp;&amp;</userinput>
<userinput>./configure -default &amp;&amp;</userinput> <userinput>./configure -default &amp;&amp;</userinput>

View File

@ -8,7 +8,7 @@
<userinput>make BINDIR=/usr/bin \</userinput> <userinput>make BINDIR=/usr/bin \</userinput>
<userinput>&nbsp;&nbsp;&nbsp;MANDIR=/usr/share/man/man1 install &amp;&amp;</userinput> <userinput>&nbsp;&nbsp;&nbsp;MANDIR=/usr/share/man/man1 install &amp;&amp;</userinput>
<userinput>cd /usr/bin &amp;&amp;</userinput> <userinput>cd /usr/bin &amp;&amp;</userinput>
<userinput>ln -s mawk awk</userinput></screen></para> <userinput>ln -sf mawk awk</userinput></screen></para>
</sect2> </sect2>

View File

@ -10,6 +10,6 @@
<userinput>cd /lib &amp;&amp;</userinput> <userinput>cd /lib &amp;&amp;</userinput>
<userinput>mv libncurses.a libncurses_g.a libncurses++.a /usr/lib &amp;&amp;</userinput> <userinput>mv libncurses.a libncurses_g.a libncurses++.a /usr/lib &amp;&amp;</userinput>
<userinput>cd /usr/lib &amp;&amp;</userinput> <userinput>cd /usr/lib &amp;&amp;</userinput>
<userinput>ln -s libncurses.a libcurses.a</userinput></screen></para> <userinput>ln -sf libncurses.a libcurses.a</userinput></screen></para>
</sect2> </sect2>

View File

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

View File

@ -5,7 +5,7 @@
<para><screen><userinput>make &amp;&amp;</userinput> <para><screen><userinput>make &amp;&amp;</userinput>
<userinput>make XSCPT='' install &amp;&amp;</userinput> <userinput>make XSCPT='' install &amp;&amp;</userinput>
<userinput>mv /usr/bin/kill /bin</userinput></screen></para> <userinput>mv -f /usr/bin/kill /bin</userinput></screen></para>
</sect2> </sect2>

View File

@ -5,7 +5,7 @@
to the LFS system (because the normal system runs glibc-2.0) it's time to remove to the LFS system (because the normal system runs glibc-2.0) it's time to remove
them now by running:</para> them now by running:</para>
<para><screen><userinput>rm /lib/libnss*.so.1 /lib/libnss*2.0*</userinput></screen></para> <para><screen><userinput>rm -f /lib/libnss*.so.1 /lib/libnss*2.0*</userinput></screen></para>
</sect1> </sect1>

View File

@ -6,7 +6,7 @@
compilation bug which occurs due to a variable (nflg), being used but not compilation bug which occurs due to a variable (nflg), being used but not
defined.</para> defined.</para>
<para><userinput>cp limits login.access and others:</userinput> These files <para><userinput>cp -f limits login.access and others:</userinput> These files
were not installed during the installation of the package so we copy were not installed during the installation of the package so we copy
them manually as those files are used to configure authentication them manually as those files are used to configure authentication
details on the system.</para> details on the system.</para>

View File

@ -6,13 +6,13 @@ following commands:</para>
<para><screen><userinput>sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' \</userinput> <para><screen><userinput>sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' \</userinput>
<userinput> src/useradd.c &gt; useradd.c.temp &amp;&amp;</userinput> <userinput>&nbsp;&nbsp;&nbsp;src/useradd.c &gt; useradd.c.temp &amp;&amp;</userinput>
<userinput>mv useradd.c.temp src/useradd.c &amp;&amp;</userinput> <userinput>mv -f useradd.c.temp src/useradd.c &amp;&amp;</userinput>
<userinput>./configure --prefix=/usr &amp;&amp;</userinput> <userinput>./configure --prefix=/usr &amp;&amp;</userinput>
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>cd etc &amp;&amp;</userinput> <userinput>cd etc &amp;&amp;</userinput>
<userinput>cp limits login.access /etc &amp;&amp;</userinput> <userinput>cp -f limits login.access /etc &amp;&amp;</userinput>
<userinput>sed "s|/var/spool/mail|/var/mail|" login.defs.linux &gt; /etc/login.defs</userinput></screen></para> <userinput>sed "s|/var/spool/mail|/var/mail|" login.defs.linux &gt; /etc/login.defs</userinput></screen></para>
</sect2> </sect2>

View File

@ -7,8 +7,8 @@
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>cd /usr/bin &amp;&amp;</userinput> <userinput>cd /usr/bin &amp;&amp;</userinput>
<userinput>mv date echo false pwd stty /bin &amp;&amp;</userinput> <userinput>mv -f date echo false pwd stty /bin &amp;&amp;</userinput>
<userinput>mv su true uname hostname /bin</userinput></screen></para> <userinput>mv -f su true uname hostname /bin</userinput></screen></para>
</sect2> </sect2>
@ -22,7 +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>[</filename> binary. We create that in this way, while still in the
<filename>/usr/bin</filename> directory:</para> <filename>/usr/bin</filename> directory:</para>
<para><screen><userinput>ln -s test [</userinput></screen></para> <para><screen><userinput>ln -sf test [</userinput></screen></para>
</sect2> </sect2>

View File

@ -15,7 +15,7 @@ processes started by init the TERM signal".</para>
<para><screen><userinput>sed \</userinput> <para><screen><userinput>sed \</userinput>
<userinput>&nbsp;&nbsp;&nbsp;'s/\(.*\)\(Sending processes\)\(.*\)/\1\2 started by init\3/' \</userinput> <userinput>&nbsp;&nbsp;&nbsp;'s/\(.*\)\(Sending processes\)\(.*\)/\1\2 started by init\3/' \</userinput>
<userinput>&nbsp;&nbsp;&nbsp;src/init.c &gt; init.c.temp &amp;&amp;</userinput> <userinput>&nbsp;&nbsp;&nbsp;src/init.c &gt; init.c.temp &amp;&amp;</userinput>
<userinput>mv init.c.temp src/init.c &amp;&amp;</userinput> <userinput>mv -f init.c.temp src/init.c &amp;&amp;</userinput>
<userinput>make -C src &amp;&amp;</userinput> <userinput>make -C src &amp;&amp;</userinput>
<userinput>make -C src install</userinput></screen></para> <userinput>make -C src install</userinput></screen></para>

View File

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

View File

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

View File

@ -18,7 +18,7 @@ in which order it is done. Install Vim by running the following commands:</para>
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>cd /usr/bin &amp;&amp;</userinput> <userinput>cd /usr/bin &amp;&amp;</userinput>
<userinput>ln -s vim vi</userinput></screen></para> <userinput>ln -sf vim vi</userinput></screen></para>
<para>If you plan on installing the X Window system on your LFS <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 system, you might want to re-compile Vim after you have installed X. Vim
@ -42,7 +42,7 @@ instead of the one presented above:</para>
<userinput>make &amp;&amp;</userinput> <userinput>make &amp;&amp;</userinput>
<userinput>make install &amp;&amp;</userinput> <userinput>make install &amp;&amp;</userinput>
<userinput>cd /usr/bin &amp;&amp;</userinput> <userinput>cd /usr/bin &amp;&amp;</userinput>
<userinput>ln -s vim vi &amp;&amp;</userinput> <userinput>ln -sf vim vi &amp;&amp;</userinput>
<userinput>mkdir /var/lib/vim</userinput></screen></para> <userinput>mkdir /var/lib/vim</userinput></screen></para>
</sect2> </sect2>

View File

@ -18,38 +18,38 @@ K002otherdaemon.</para>
<userinput>chmod 754 sendsignals setclock sysklogd template &amp;&amp;</userinput> <userinput>chmod 754 sendsignals setclock sysklogd template &amp;&amp;</userinput>
<userinput>chmod 754 localnet ethnet &amp;&amp;</userinput> <userinput>chmod 754 localnet ethnet &amp;&amp;</userinput>
<userinput>cd ../rc0.d &amp;&amp;</userinput> <userinput>cd ../rc0.d &amp;&amp;</userinput>
<userinput>ln -s ../init.d/ethnet K800ethnet &amp;&amp;</userinput> <userinput>ln -sf ../init.d/ethnet K800ethnet &amp;&amp;</userinput>
<userinput>ln -s ../init.d/sysklogd K900sysklogd &amp;&amp;</userinput> <userinput>ln -sf ../init.d/sysklogd K900sysklogd &amp;&amp;</userinput>
<userinput>ln -s ../init.d/sendsignals S800sendsignals &amp;&amp;</userinput> <userinput>ln -sf ../init.d/sendsignals S800sendsignals &amp;&amp;</userinput>
<userinput>ln -s ../init.d/mountfs S900mountfs &amp;&amp;</userinput> <userinput>ln -sf ../init.d/mountfs S900mountfs &amp;&amp;</userinput>
<userinput>ln -s ../init.d/halt S999halt &amp;&amp;</userinput> <userinput>ln -sf ../init.d/halt S999halt &amp;&amp;</userinput>
<userinput>cd ../rc6.d &amp;&amp;</userinput> <userinput>cd ../rc6.d &amp;&amp;</userinput>
<userinput>ln -s ../init.d/ethnet K800ethnet &amp;&amp;</userinput> <userinput>ln -sf ../init.d/ethnet K800ethnet &amp;&amp;</userinput>
<userinput>ln -s ../init.d/sysklogd K900sysklogd &amp;&amp;</userinput> <userinput>ln -sf ../init.d/sysklogd K900sysklogd &amp;&amp;</userinput>
<userinput>ln -s ../init.d/sendsignals S800sendsignals &amp;&amp;</userinput> <userinput>ln -sf ../init.d/sendsignals S800sendsignals &amp;&amp;</userinput>
<userinput>ln -s ../init.d/mountfs S900mountfs &amp;&amp;</userinput> <userinput>ln -sf ../init.d/mountfs S900mountfs &amp;&amp;</userinput>
<userinput>ln -s ../init.d/reboot S999reboot &amp;&amp;</userinput> <userinput>ln -sf ../init.d/reboot S999reboot &amp;&amp;</userinput>
<userinput>cd ../rcS.d &amp;&amp;</userinput> <userinput>cd ../rcS.d &amp;&amp;</userinput>
<userinput>ln -s ../init.d/localnet S100localnet &amp;&amp;</userinput> <userinput>ln -sf ../init.d/localnet S100localnet &amp;&amp;</userinput>
<userinput>ln -s ../init.d/checkfs S200checkfs &amp;&amp;</userinput> <userinput>ln -sf ../init.d/checkfs S200checkfs &amp;&amp;</userinput>
<userinput>ln -s ../init.d/mountfs S300mountfs &amp;&amp;</userinput> <userinput>ln -sf ../init.d/mountfs S300mountfs &amp;&amp;</userinput>
<userinput>ln -s ../init.d/setclock S400setclock &amp;&amp;</userinput> <userinput>ln -sf ../init.d/setclock S400setclock &amp;&amp;</userinput>
<userinput>ln -s ../init.d/loadkeys S500loadkeys &amp;&amp;</userinput> <userinput>ln -sf ../init.d/loadkeys S500loadkeys &amp;&amp;</userinput>
<userinput>cd ../rc1.d &amp;&amp;</userinput> <userinput>cd ../rc1.d &amp;&amp;</userinput>
<userinput>ln -s ../init.d/ethnet K800ethnet &amp;&amp;</userinput> <userinput>ln -sf ../init.d/ethnet K800ethnet &amp;&amp;</userinput>
<userinput>ln -s ../init.d/sysklogd K900sysklogd &amp;&amp;</userinput> <userinput>ln -sf ../init.d/sysklogd K900sysklogd &amp;&amp;</userinput>
<userinput>cd ../rc2.d &amp;&amp;</userinput> <userinput>cd ../rc2.d &amp;&amp;</userinput>
<userinput>ln -s ../init.d/sysklogd S100sysklogd &amp;&amp;</userinput> <userinput>ln -sf ../init.d/sysklogd S100sysklogd &amp;&amp;</userinput>
<userinput>ln -s ../init.d/ethnet K800ethnet &amp;&amp;</userinput> <userinput>ln -sf ../init.d/ethnet K800ethnet &amp;&amp;</userinput>
<userinput>cd ../rc3.d &amp;&amp;</userinput> <userinput>cd ../rc3.d &amp;&amp;</userinput>
<userinput>ln -s ../init.d/sysklogd S100sysklogd &amp;&amp;</userinput> <userinput>ln -sf ../init.d/sysklogd S100sysklogd &amp;&amp;</userinput>
<userinput>ln -s ../init.d/ethnet S200ethnet &amp;&amp;</userinput> <userinput>ln -sf ../init.d/ethnet S200ethnet &amp;&amp;</userinput>
<userinput>cd ../rc4.d &amp;&amp;</userinput> <userinput>cd ../rc4.d &amp;&amp;</userinput>
<userinput>ln -s ../init.d/sysklogd S100sysklogd &amp;&amp;</userinput> <userinput>ln -sf ../init.d/sysklogd S100sysklogd &amp;&amp;</userinput>
<userinput>ln -s ../init.d/ethnet S200ethnet &amp;&amp;</userinput> <userinput>ln -sf ../init.d/ethnet S200ethnet &amp;&amp;</userinput>
<userinput>cd ../rc5.d &amp;&amp;</userinput> <userinput>cd ../rc5.d &amp;&amp;</userinput>
<userinput>ln -s ../init.d/sysklogd S100sysklogd &amp;&amp;</userinput> <userinput>ln -sf ../init.d/sysklogd S100sysklogd &amp;&amp;</userinput>
<userinput>ln -s ../init.d/ethnet S200ethnet</userinput></screen></para> <userinput>ln -sf ../init.d/ethnet S200ethnet</userinput></screen></para>
</sect1> </sect1>

View File

@ -17,8 +17,8 @@ following commands are run to build the kernel:</para>
<userinput>make bzImage &amp;&amp;</userinput> <userinput>make bzImage &amp;&amp;</userinput>
<userinput>make modules &amp;&amp;</userinput> <userinput>make modules &amp;&amp;</userinput>
<userinput>make modules_install &amp;&amp;</userinput> <userinput>make modules_install &amp;&amp;</userinput>
<userinput>cp arch/i386/boot/bzImage /boot/lfskernel &amp;&amp;</userinput> <userinput>cp -f arch/i386/boot/bzImage /boot/lfskernel &amp;&amp;</userinput>
<userinput>cp System.map /boot</userinput></screen></para> <userinput>cp -f System.map /boot</userinput></screen></para>
<para>Note: the arch/i386/boot/bzImage path may vary on <para>Note: the arch/i386/boot/bzImage path may vary on
different platforms.</para> different platforms.</para>

View File

@ -14,7 +14,7 @@ the host system or the LFS system).</para>
system:</para> system:</para>
<para><screen><userinput>logout</userinput> <para><screen><userinput>logout</userinput>
<userinput>cp $LFS/boot/lfskernel /boot</userinput></screen></para> <userinput>cp -f $LFS/boot/lfskernel /boot</userinput></screen></para>
<para>The next step is adding an entry to /etc/lilo.conf so that we can <para>The next step is adding an entry to /etc/lilo.conf so that we can
choose LFS when booting the computer:</para> choose LFS when booting the computer:</para>
@ -36,8 +36,8 @@ partition's designation.</para>
<para>The last step is syncing the host system lilo config. files with the <para>The last step is syncing the host system lilo config. files with the
LFS system:</para> LFS system:</para>
<para><screen><userinput>cp /etc/lilo.conf $LFS/etc &amp;&amp;</userinput> <para><screen><userinput>cp -f /etc/lilo.conf $LFS/etc &amp;&amp;</userinput>
<userinput>cp &lt;kernel images&gt; $LFS/boot</userinput></screen></para> <userinput>cp -f &lt;kernel images&gt; $LFS/boot</userinput></screen></para>
<para>To find out which kernel images files are being used, look at the <para>To find out which kernel images files are being used, look at the
/etc/lilo.conf file and find the lines starting with /etc/lilo.conf file and find the lines starting with