diff --git a/chapter05/fileutils-exp.xml b/chapter05/fileutils-exp.xml index 8f77ba49c..2a117d4e4 100644 --- a/chapter05/fileutils-exp.xml +++ b/chapter05/fileutils-exp.xml @@ -5,7 +5,7 @@ run this command in order to keep a backup of the file we are about to change. -cp -f lib/Makefile.in lib/Makefile.in.backup && +cp lib/Makefile.in lib/Makefile.in.backup && sed -e 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \    -e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \    lib/Makefile.in > lib/Makefile.in~ && diff --git a/chapter05/fileutils-inst.xml b/chapter05/fileutils-inst.xml index 2dca914a6..39b07067d 100644 --- a/chapter05/fileutils-inst.xml +++ b/chapter05/fileutils-inst.xml @@ -7,7 +7,7 @@ limited to, Linux systems that run Glibc-2.2.3 with an AMD CPU (Athlons and Durons are the most reported used CPU's). If you are in this category, run the following to sed commands before you compile this package. -cp -f lib/Makefile.in lib/Makefile.in.backup && +cp lib/Makefile.in lib/Makefile.in.backup && sed -e 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \    -e 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \    lib/Makefile.in > lib/Makefile.in~ && diff --git a/chapter05/gzip-inst.xml b/chapter05/gzip-inst.xml index 478d68caa..20f227158 100644 --- a/chapter05/gzip-inst.xml +++ b/chapter05/gzip-inst.xml @@ -8,7 +8,7 @@ unpacked. ./configure --prefix=$LFS/usr && make LDFLAGS=-static && make install && -cp -f $LFS/usr/bin/gunzip $LFS/usr/bin/gzip $LFS/bin && +cp $LFS/usr/bin/gunzip $LFS/usr/bin/gzip $LFS/bin && rm -f $LFS/usr/bin/gunzip $LFS/usr/bin/gzip diff --git a/chapter06/bzip2-inst.xml b/chapter06/bzip2-inst.xml index 4e6ca8e03..9c2f003d0 100644 --- a/chapter06/bzip2-inst.xml +++ b/chapter06/bzip2-inst.xml @@ -5,13 +5,13 @@ make -f Makefile-libbz2_so && make bzip2recover libbz2.a && -cp -f bzip2-shared /bin/bzip2 && -cp -f bzip2recover /bin && -cp -f bzip2.1 /usr/share/man/man1 && -cp -f bzlib.h /usr/include && -cp -af libbz2.so* /lib && -rm -f /usr/lib/libbz2.a && -cp -f libbz2.a /usr/lib && +cp bzip2-shared /bin/bzip2 && +cp bzip2recover /bin && +cp bzip2.1 /usr/share/man/man1 && +cp bzlib.h /usr/include && +cp -a libbz2.so* /lib && +rm /usr/lib/libbz2.a && +cp libbz2.a /usr/lib && cd /usr/lib && ln -sf ../../lib/libbz2.so && cd /bin && diff --git a/chapter06/file-inst.xml b/chapter06/file-inst.xml index 9602cfd04..c1424dc4e 100644 --- a/chapter06/file-inst.xml +++ b/chapter06/file-inst.xml @@ -6,7 +6,7 @@ break is placed exactly where it is in the book. Don't try and put it all on one line otherwise it won't work. Install File by running the following commands: -cp -f readelf.h readelf.h.backup && +cp readelf.h readelf.h.backup && sed '/#define __/a \    #include <stdint.h>' readelf.h.backup > readelf.h && ./configure --prefix=/usr --datadir=/usr/share/misc && diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index d6713c964..9a1029eba 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -10,17 +10,17 @@ would do. mknod -m 0666 /dev/null c 1 3 && touch /etc/ld.so.conf && -cp -f malloc/Makefile malloc/Makefile.backup && +cp malloc/Makefile malloc/Makefile.backup && sed 's%\$(PERL)%/usr/bin/perl%' malloc/Makefile > tmp~ && mv -f tmp~ malloc/Makefile && -cp -f login/Makefile login/Makefile.backup && +cp login/Makefile login/Makefile.backup && sed 's/root/0/' login/Makefile > tmp~ && mv -f tmp~ login/Makefile && mkdir ../glibc-build && cd ../glibc-build && ../glibc-&glibc-version;/configure --prefix=/usr \    --enable-add-ons --libexecdir=/usr && -cp -f config.make config.make.backup && +cp config.make config.make.backup && sed 's/cross-compiling = yes/cross-compiling = no/' \    config.make > tmp~ && mv -f tmp~ config.make && diff --git a/chapter06/netkitbase-inst.xml b/chapter06/netkitbase-inst.xml index 36f546600..c4cc5d3ce 100644 --- a/chapter06/netkitbase-inst.xml +++ b/chapter06/netkitbase-inst.xml @@ -7,7 +7,7 @@ make && make install && cd etc.sample && -cp -f services protocols /etc +cp services protocols /etc There are other files in the etc.sample directory which might be of diff --git a/chapter06/shadowpwd-exp.xml b/chapter06/shadowpwd-exp.xml index 97d4497d7..c861d071f 100644 --- a/chapter06/shadowpwd-exp.xml +++ b/chapter06/shadowpwd-exp.xml @@ -6,7 +6,7 @@ compilation bug which occurs due to a variable (nflg), being used but not defined. -cp -f limits login.access and others: These files +cp limits login.access and others: These files were not installed during the installation of the package so we copy them manually as those files are used to configure authentication details on the system. diff --git a/chapter06/shadowpwd-inst.xml b/chapter06/shadowpwd-inst.xml index 8f6c1f529..9ce63bbbd 100644 --- a/chapter06/shadowpwd-inst.xml +++ b/chapter06/shadowpwd-inst.xml @@ -12,7 +12,7 @@ following commands: make && make install && cd etc && -cp -f limits login.access /etc && +cp limits login.access /etc && sed 's%/var/spool/mail%/var/mail%' login.defs.linux > /etc/login.defs cd /lib && mv libshadow.a /usr/lib && diff --git a/chapter08/kernel.xml b/chapter08/kernel.xml index 5682b23ce..93616833d 100644 --- a/chapter08/kernel.xml +++ b/chapter08/kernel.xml @@ -25,8 +25,8 @@ make menuconfig. make bzImage && make modules && make modules_install && -cp -f arch/i386/boot/bzImage /boot/lfskernel && -cp -f System.map /boot +cp arch/i386/boot/bzImage /boot/lfskernel && +cp System.map /boot Note: the arch/i386/boot/bzImage path may vary on different platforms. diff --git a/chapter08/lilo.xml b/chapter08/lilo.xml index d49e6a051..1c57dada6 100644 --- a/chapter08/lilo.xml +++ b/chapter08/lilo.xml @@ -14,7 +14,7 @@ the host system or the LFS system). system: logout -cp -f $LFS/boot/lfskernel /boot +cp $LFS/boot/lfskernel /boot The next step is adding an entry to /etc/lilo.conf so that we can choose LFS when booting the computer: @@ -40,8 +40,8 @@ the line read-only should be changed to The last step is syncing the host system lilo config. files with the LFS system: -cp -f /etc/lilo.conf $LFS/etc && -cp -f <kernel images> $LFS/boot +cp /etc/lilo.conf $LFS/etc && +cp <kernel images> $LFS/boot To find out which kernel images files are being used, look at the /etc/lilo.conf file and find the lines starting with