diff options
Diffstat (limited to 'chapter06/kernfs.xml')
-rw-r--r-- | chapter06/kernfs.xml | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/chapter06/kernfs.xml b/chapter06/kernfs.xml index 4667d6012..51bcbe59c 100644 --- a/chapter06/kernfs.xml +++ b/chapter06/kernfs.xml @@ -74,16 +74,17 @@ mount -vt sysfs sysfs $LFS/sys</userinput></screen> <para>In some host systems, <filename>/dev/shm</filename> is a symbolic link to <filename class="directory">/run/shm</filename>. - Inside a chroot environment, this symbolic link needs to be - changed to a normal directory before mounting as a temporary - file system:</para> - -<screen><userinput>if [ -h /dev/shm ]; then - rm -f $LFS/dev/shm - mkdir $LFS/dev/shm -fi - -mount -vt tmpfs shm $LFS/dev/shm</userinput></screen> + Inside a chroot environment, this temporary file system needs + to be mounted separate from the host file system:</para> + +<screen><userinput>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/dev/shm +fi</userinput></screen> </sect2> |