I've been thinking about this some more and the proposed solution appears to be correct for the case when the /dev/shm -> /run/shm symlink is present.
I'm not sure about the case when the symlink is not present, wouldn't we want to mount a new tmpfs directly on $LFS/dev/shm like we do now? Also, we probably don't want to make assumptions for where the symlink is pointing.
if [ -h $LFS/dev/shm ]; then
link=$(readlink $LFS/dev/shm)
mkdir -p $LFS/$link
mount -vt tmpfs shm $LFS/$link
unset link
else
mount -vt tmpfs shm $LFS/shm
fi
I'll make the change if we agree that this is the right way to go.