diff options
author | Mark Hymers <markh@linuxfromscratch.org> | 2001-08-24 20:45:42 +0000 |
---|---|---|
committer | Mark Hymers <markh@linuxfromscratch.org> | 2001-08-24 20:45:42 +0000 |
commit | bccc28841facca8ece8b0ecac5b5f04cd6c545e0 (patch) | |
tree | 9eec18edb5174f825fe116b91e7eb3fcae113193 /chapter06 | |
parent | 0a68a6c5e7135beb133bd8d2ee4a59d927bd588a (diff) |
[Bug 140] Sed consistencies
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1020 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r-- | chapter06/ed-inst.xml | 4 | ||||
-rw-r--r-- | chapter06/glibc-exp.xml | 2 | ||||
-rw-r--r-- | chapter06/glibc-inst.xml | 6 | ||||
-rw-r--r-- | chapter06/man-inst.xml | 6 | ||||
-rw-r--r-- | chapter06/shadowpwd-exp.xml | 2 | ||||
-rw-r--r-- | chapter06/shadowpwd-inst.xml | 10 | ||||
-rw-r--r-- | chapter06/sysvinit-inst.xml | 9 | ||||
-rw-r--r-- | chapter06/utillinux-inst.xml | 9 |
8 files changed, 28 insertions, 20 deletions
diff --git a/chapter06/ed-inst.xml b/chapter06/ed-inst.xml index 698f0d299..052d8ab0f 100644 --- a/chapter06/ed-inst.xml +++ b/chapter06/ed-inst.xml @@ -3,8 +3,8 @@ <para>Install Ed by running the following commands:</para> -<para><screen><userinput>cp buf.c buf.c-temp &&</userinput> -<userinput>sed 's/int u/int u, sfd/' buf.c-temp | \</userinput> +<para><screen><userinput>cp buf.c buf.c.backup &&</userinput> +<userinput>sed 's/int u/int u, sfd/' buf.c.backup | \</userinput> <userinput> sed '/.*\*mktemp.*/d' | \</userinput> <userinput> sed 's/.*if (mktemp.*/ sfd = mkstemp(sfn);\</userinput> <userinput> if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL)/' > buf.c</userinput> diff --git a/chapter06/glibc-exp.xml b/chapter06/glibc-exp.xml index d49215c64..ab2c09f53 100644 --- a/chapter06/glibc-exp.xml +++ b/chapter06/glibc-exp.xml @@ -12,7 +12,7 @@ that it can't read the file, so we simply create an empty file (the empty file will have Glibc default to using /lib and /usr/lib which is fine right now).</para> -<para><userinput>sed 's|$(PERL)|/usr/bin/perl|' +<para><userinput>sed 's%\$(PERL)%/usr/bin/perl%' ../glibc-&glibc-version;/malloc/Makefile > tmp~:</userinput> This sed command searches through <filename>../glibc-&glibc-version;/malloc/Makefile</filename> and converts all occurances of <filename>$(PERL)</filename> to diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index 95ad570cb..ec3767dcb 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -12,9 +12,13 @@ would do.</para> <userinput>touch /etc/ld.so.conf &&</userinput> <userinput>mkdir ../glibc-build &&</userinput> <userinput>cd ../glibc-build &&</userinput> -<userinput>sed 's|$(PERL)|/usr/bin/perl|' \</userinput> +<userinput>cp -f ../glibc-&glibc-version;/malloc/Makefile \</userinput> +<userinput> ../glibc-&glibc-version;/malloc/Makefile.backup &&</userinput> +<userinput>sed 's%\$(PERL)%/usr/bin/perl%' \</userinput> <userinput> ../glibc-&glibc-version;/malloc/Makefile > tmp~ &&</userinput> <userinput>mv -f tmp~ ../glibc-&glibc-version;/malloc/Makefile &&</userinput> +<userinput>cp -f ../glibc-&glibc-version;/login/Makefile \</userinput> +<userinput> ../glibc-&glibc-version;/login/Makefile.backup &&</userinput> <userinput>sed 's/root/0/' ../glibc-&glibc-version;/login/Makefile > tmp~ &&</userinput> <userinput>mv -f tmp~ ../glibc-&glibc-version;/login/Makefile &&</userinput> <userinput>../glibc-&glibc-version;/configure \</userinput> diff --git a/chapter06/man-inst.xml b/chapter06/man-inst.xml index 1c457fc90..3b624f92f 100644 --- a/chapter06/man-inst.xml +++ b/chapter06/man-inst.xml @@ -4,8 +4,10 @@ <para>Run the following commands to install man:</para> <para><screen><userinput>for i in configure src/Makefile.in src/makewhatis.sh</userinput> -<userinput>do sed s/gawk/awk/g $i > $i.fixed</userinput> -<userinput>mv -f $i.fixed $i</userinput> +<userinput>do</userinput> +<userinput> cp $i $i.backup &&</userinput> +<userinput> sed 's/gawk/awk/g' $i > tmp~ &&</userinput> +<userinput> mv -f tmp~ $i</userinput> <userinput>done</userinput> <userinput>chmod 700 configure &&</userinput> <userinput>./configure -default &&</userinput> diff --git a/chapter06/shadowpwd-exp.xml b/chapter06/shadowpwd-exp.xml index 5a2684570..97d4497d7 100644 --- a/chapter06/shadowpwd-exp.xml +++ b/chapter06/shadowpwd-exp.xml @@ -11,7 +11,7 @@ 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.</para> -<para><userinput>sed "s|/var/spool/mail|/var/mail|" login.defs.linux > +<para><userinput>sed "s%/var/spool/mail%/var/mail%" login.defs.linux > /etc/login.defs</userinput>: /var/spool/mail is the old location of the user mailboxes. The location that is used nowadays is /var/mail.</para> diff --git a/chapter06/shadowpwd-inst.xml b/chapter06/shadowpwd-inst.xml index aa95add10..50a7f3d13 100644 --- a/chapter06/shadowpwd-inst.xml +++ b/chapter06/shadowpwd-inst.xml @@ -4,16 +4,16 @@ <para>Install the Shadow Password Suite by running the following commands:</para> - -<para><screen><userinput>sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' \</userinput> -<userinput> src/useradd.c > useradd.c.temp &&</userinput> -<userinput>mv -f useradd.c.temp src/useradd.c &&</userinput> +<para><screen><userinput>cp src/useradd.c src/useradd.c.backup &&</userinput> +<userinput>sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' \</userinput> +<userinput> src/useradd.c > tmp~ &&</userinput> +<userinput>mv -f tmp~ src/useradd.c &&</userinput> <userinput>./configure --prefix=/usr &&</userinput> <userinput>make &&</userinput> <userinput>make install &&</userinput> <userinput>cd etc &&</userinput> <userinput>cp -f limits login.access /etc &&</userinput> -<userinput>sed "s|/var/spool/mail|/var/mail|" login.defs.linux > /etc/login.defs</userinput></screen></para> +<userinput>sed 's%/var/spool/mail%/var/mail%' login.defs.linux > /etc/login.defs</userinput></screen></para> </sect2> diff --git a/chapter06/sysvinit-inst.xml b/chapter06/sysvinit-inst.xml index 5174d4601..1ebc5bd5e 100644 --- a/chapter06/sysvinit-inst.xml +++ b/chapter06/sysvinit-inst.xml @@ -12,10 +12,11 @@ processes started by init the TERM signal".</para> <para>Install Sysvinit by running the following commands:</para> -<para><screen><userinput>sed \</userinput> -<userinput> 's/\(.*\)\(Sending processes\)\(.*\)/\1\2 started by init\3/' \</userinput> -<userinput> src/init.c > init.c.temp &&</userinput> -<userinput>mv -f init.c.temp src/init.c &&</userinput> +<para><screen><userinput>cp src/init.c src/init.c.backup &&</userinput> +<userinput>sed \</userinput> +<userinput> 's/\(.*\)\(Sending processes\)\(.*\)/\1\2 started by init\3/' \</userinput> +<userinput> src/init.c > tmp~ &&</userinput> +<userinput>mv -f tmp~ src/init.c &&</userinput> <userinput>make -C src &&</userinput> <userinput>make -C src install</userinput></screen></para> diff --git a/chapter06/utillinux-inst.xml b/chapter06/utillinux-inst.xml index 9bad2860e..b59dcf12d 100644 --- a/chapter06/utillinux-inst.xml +++ b/chapter06/utillinux-inst.xml @@ -5,10 +5,11 @@ adjtime file, instead of the usual /etc. To make hwclock, which is part of the util-linux package, FHS-compliant, run the following.</para> -<para><screen><userinput>sed 's|etc/adjtime|var/lib/hwclock/adjtime|' \</userinput> -<userinput> hwclock/hwclock.c > hwclock~ &&</userinput> -<userinput>mv -f hwclock~ hwclock/hwclock.c &&</userinput> -<userinput>mkdir /var/lib/hwclock</userinput></screen></para> +<para><screen><userinput>cp hwclock/hwclock.c hwclock/hwclock.c.backup &&</userinput> +<userinput>sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \</userinput> +<userinput> hwclock/hwclock.c > tmp~ &&</userinput> +<userinput>mv -f tmp~ hwclock/hwclock.c &&</userinput> +<userinput>mkdir -p /var/lib/hwclock</userinput></screen></para> </sect2> |