On Sun, 2012-01-08 at 18:03 -0700, jasonps...@jegas.com wrote: > I'm doing a few things there - but I do set up that sim link - but I > don't quite understand it > because for what you describe, my small mind thinks it should be written > > > ln -s $LFS/tools /tools > > But I'm sure its me just not understanding. Though I did test that > syntax and it seems to > work how you describe the symlink in 4.2 is supposed to.
Yes, the syntax for the 'ln' command is kind of weird. But see the man page, which lists four different forms that can be used - you're thinking of the first one, where the last parameter is the name of the link. However, the book is using the third one - when the parameter is the name of an existing directory, the link is created in that directory, with the same name as whatever it's pointing to. Thus, the command in the book does exactly the same as the one you give above. Addressing your original question about the commands in chapter 5 referring to /tools rather than $LFS/tools, the reason is that we don't want anything to end up with $LFS/tools hardcoded in it, as that will stop working in chapter 6. Obviously that doesn't matter for a simple copy command like the one you asked about, but it does for others (like ./configure). As a result, there should be very few places in the book where commands actually refer to $LFS/tools. The only one I know of is the point where we set the owner in 4.3, and that's because we want to set the owner of the directory, not of the symlink. Simon.
signature.asc
Description: This is a digitally signed message part
-- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page