Jeremy Huntwork wrote:
> [EMAIL PROTECTED] wrote:
>
>> + <para>Fix a potential issue if <filename>/etc/ld.so.preload</filename>
>> is
>> + used on the host system.</para>
>> +
>> +<screen><userinput remap="pre">sed -i
>> 's@/etc/ld.so.preload@/tools/etc/ld.so.preload@'
>> elf/rtld.c</userinput></screen>
>> +
>>
>
> Sorry to be critical, but I feel I should mention two things:
>
> 1. The policy (unspoken or unwritten? I can't remember) in LFS is that
> we shouldn't use -i for sed before we build it in chapter 5, because we
> don't want to assume the host's sed has that functionality. That's why
> we've done the cp file{,.bak} && sed 's///' file.bak > file type stuff
> elsewhere in chapter 5.
>
Thanks for the reminder. It hadn't even crossed my mind. Though, given
our host requirements, I highly doubt that we'll see a version of sed
that doesn't support -i anymore. I could certainly be wrong though.
> 2. Especially if we do the longer 'cp then sed' command, we have here a
> golden opportunity to use '&' and reduce the command length. So,
> something like:
>
> cp elf/rtld.c{,.orig}
> sed 's@/etc/ld.so.preload@/tools&@' elf/rtld.c.orig > elf/rtld.c
>
>
Unfortunately, focusing on working instructions, I've pretty much lost
track of educational value, going for the most simple (self explanatory)
commands. The & never even crossed my mind for this one. I go for
direct substitution almost always, and never use & myself. Old habits
die hard I guess. Anyway, it is a good time to jump in here and get
your name in the changelog. ;-) The majority of the big edits are
done. There should be no worry of stepping on toes if you want to
add/change something, please go for it...especially if it presents a
chance to show the reader something new or different.
-- DJ Lucas
--
This message has been scanned for viruses and
dangerous content, and is believed to be clean.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page