aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06
diff options
context:
space:
mode:
authorZack Winkles <winkie@linuxfromscratch.org>2004-06-07 19:16:21 +0000
committerZack Winkles <winkie@linuxfromscratch.org>2004-06-07 19:16:21 +0000
commit2ec4b60f359413c6f0163b9e72108c24460573e7 (patch)
tree7f8fadd44d9a25a95ce26daf9748a7f0040715ae /chapter06
parent9109cd46dd8cbe0798713282e4908aeb98910a41 (diff)
Normalized usage of sed throughout the book
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3762 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r--chapter06/gzip.xml2
-rw-r--r--chapter06/man.xml4
-rw-r--r--chapter06/readjusting.xml7
-rw-r--r--chapter06/shadow.xml6
-rw-r--r--chapter06/sysvinit.xml5
-rw-r--r--chapter06/util-linux.xml4
6 files changed, 11 insertions, 17 deletions
diff --git a/chapter06/gzip.xml b/chapter06/gzip.xml
index 4804b48ad..0cb8f2b57 100644
--- a/chapter06/gzip.xml
+++ b/chapter06/gzip.xml
@@ -38,7 +38,7 @@ GCC, Glibc, Grep, Make, Sed</seg></seglistitem>
the location of the binary, the following command ensures that the new
location gets placed into the script:</para>
-<screen><userinput>sed -i 's%"BINDIR"%/bin%' gzexe.in</userinput></screen>
+<screen><userinput>sed -i 's@"BINDIR"@/bin@g' gzexe.in</userinput></screen>
<para>Compile the package:</para>
diff --git a/chapter06/man.xml b/chapter06/man.xml
index 552d07d21..54f7174a6 100644
--- a/chapter06/man.xml
+++ b/chapter06/man.xml
@@ -40,13 +40,13 @@ width instead of being limited to 80 characters:</para>
switch to the <emphasis>PAGER</emphasis> variable so that escape sequences are
properly handled by Less:</para>
-<screen><userinput>sed -i 's/-is/&amp;R/' configure</userinput></screen>
+<screen><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
<para>The third is also a sed substitution to comment out the <quote>MANPATH
/usr/man</quote> line in the <filename>man.conf</filename> file to prevent
redundant results when using programs such as <command>whatis</command>:</para>
-<screen><userinput>sed -i 's%MANPATH./usr/man%#&amp;%' src/man.conf.in</userinput></screen>
+<screen><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
<para>Now prepare Man for compilation:</para>
diff --git a/chapter06/readjusting.xml b/chapter06/readjusting.xml
index c8c2f4bbd..a81c540f6 100644
--- a/chapter06/readjusting.xml
+++ b/chapter06/readjusting.xml
@@ -52,11 +52,8 @@ this:</para>
<!-- Ampersands are needed to allow cut and paste -->
-<screen><userinput>SPECFILE=`gcc --print-file specs` &amp;&amp;
-sed -e 's@ /tools/lib/ld-linux.so.2@ /lib/ld-linux.so.2@g' \
- $SPECFILE &gt; newspecfile &amp;&amp;
-mv -f newspecfile $SPECFILE &amp;&amp;
-unset SPECFILE</userinput></screen>
+<screen><userinput>sed -i 's@ /tools/lib/ld-linux.so.2@ /lib/ld-linux.so.2@g' \
+ `gcc --print-file specs`</userinput></screen>
<para>Again, cutting and pasting the above is recommended. And just like
before, it is a good idea to visually inspect the specs file to verify the
diff --git a/chapter06/shadow.xml b/chapter06/shadow.xml
index 0018929a2..1ce985807 100644
--- a/chapter06/shadow.xml
+++ b/chapter06/shadow.xml
@@ -66,9 +66,9 @@ both these things by changing the relevant configuration file while copying it
to its destination (it's probably better to cut-and-paste this rather than try
and type it all in):</para>
-<screen><userinput>sed -e 's%#MD5_CRYPT_ENAB.no%MD5_CRYPT_ENAB yes%' \
- -e 's%/var/spool/mail%/var/mail%' \
- etc/login.defs.linux &gt; /etc/login.defs</userinput></screen>
+<screen><userinput>cp etc/login.defs.linux /etc/login.defs
+sed -i -e 's@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@' \
+ -e 's@/var/spool/mail@/var/mail@' /etc/login.defs</userinput></screen>
<para>Move some misplaced symlinks/programs to their proper locations:</para>
diff --git a/chapter06/sysvinit.xml b/chapter06/sysvinit.xml
index 9f2ad48f8..4f098a0b0 100644
--- a/chapter06/sysvinit.xml
+++ b/chapter06/sysvinit.xml
@@ -36,9 +36,8 @@ run-level. While doing this, <command>init</command> outputs messages like
misinterpretation, you can modify the source so that these messages read like
<quote>Sending processes started by init the TERM signal</quote> instead:</para>
-<screen><userinput>cp src/init.c{,.backup}
-sed 's/Sending processes/&amp; started by init/g' \
- src/init.c.backup &gt; src/init.c</userinput></screen>
+<screen><userinput>sed -i 's@Sending processes@&amp; started by init@g' \
+ src/init.c</userinput></screen>
<para>Compile Sysvinit:</para>
diff --git a/chapter06/util-linux.xml b/chapter06/util-linux.xml
index 64658f402..fbd42374a 100644
--- a/chapter06/util-linux.xml
+++ b/chapter06/util-linux.xml
@@ -35,9 +35,7 @@ instead of the usual <filename>/etc</filename>, as the location for the
<filename>adjtime</filename> file. To make the <command>hwclock</command>
program FHS-compliant, run the following:</para>
-<screen><userinput>cp hwclock/hwclock.c{,.backup}
-sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \
- hwclock/hwclock.c.backup &gt; hwclock/hwclock.c
+<screen><userinput>sed -i 's@etc/adjtime@var/lib/hwclock/adjtime@g' hwclock/hwclock.c
mkdir -p /var/lib/hwclock</userinput></screen>
</sect2>