barius.drubeck at gmail.com
Sun Oct 15 09:41:27 PDT 2006
On Sunday 15 October 2006 17:32, Richard Caldwell wrote:
> book version 6.0 chapter 5.29. After installing bash3.0 the
> following command is issued: ln -s bash /tools/bin/sh
> but immediately after this the bash-3.0 directory is removed! What's
> the point in this symlink.? As I understand, it creates a link called
> '/tools/bin/sh' that points to bash in the current directory which is
> subsequently removed. After the bash directory is removed, what does
> the link point to?
You've got it almost correct ;-). It's not the current directory of the
process, but a path relative to the symlink itself. So in this
case, /tools/bin/sh is a symlink to /tools/bin/bash, except it does not
contain the absolute path, so if you move the bin directory somewhere
else or access it via a different mount, then the link is not broken.
E.g. /mnt/lfs/tools/bin/sh refers to /mnt/lfs/tools/bin/bash and not
to /tools/bin/bash, if you get what I mean.
More information about the lfs-support