From d954e9c82a483fb7201f6553ce2045445b125e58 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Thu, 23 Jan 2014 09:15:05 +0000 Subject: [PATCH] Adapt the umounting of kernel virtual filesystems to new instructions in the LFS book --- LFS/master.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/LFS/master.sh b/LFS/master.sh index 46eb9a4..12959e2 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -520,20 +520,18 @@ devices: ck_UID sudo mount -vt devpts devpts \$(MOUNT_PT)/dev/pts sudo mount -vt proc proc \$(MOUNT_PT)/proc sudo mount -vt sysfs sysfs \$(MOUNT_PT)/sys + sudo mount -vt tmpfs tmpfs \$(MOUNT_PT)/run if [ -h \$(MOUNT_PT)/dev/shm ]; then \\ - link=\$\$(readlink \$(MOUNT_PT)/dev/shm); \\ - sudo mkdir -p \$(MOUNT_PT)/\$\$link; \\ - sudo mount -vt tmpfs shm \$(MOUNT_PT)/\$\$link; \\ - unset link; \\ - else \\ - sudo mount -vt tmpfs shm \$(MOUNT_PT)/dev/shm; \\ + sudo mkdir -p \$(MOUNT_PT)/\$\$(readlink \$(MOUNT_PT)/dev/shm); \\ fi teardown: sudo umount -v \$(MOUNT_PT)/sys sudo umount -v \$(MOUNT_PT)/proc sudo umount -v \$(MOUNT_PT)/dev/pts - if [ -h \$(MOUNT_PT)/dev/shm ]; then \\ + if mountpoint -q \$(MOUNT_POINT)/run; then \\ + sudo umount -v \$(MOUNT_POINT)/run; \\ + elif [ -h \$(MOUNT_PT)/dev/shm ]; then \\ link=\$\$(readlink \$(MOUNT_PT)/dev/shm); \\ sudo umount -v \$(MOUNT_PT)/\$\$link; \\ unset link; \\ @@ -577,7 +575,9 @@ restore-luser-env: do_housekeeping: @-umount \$(MOUNT_PT)/sys @-umount \$(MOUNT_PT)/proc - @-if [ -h \$(MOUNT_PT)/dev/shm ]; then \\ + @-if mountpoint -q \$(MOUNT_PT)/run; then \\ + umount \$(MOUNT_PT)/run; \\ + elif [ -h \$(MOUNT_PT)/dev/shm ]; then \\ link=\$\$(readlink \$(MOUNT_PT)/dev/shm); \\ umount \$(MOUNT_PT)/\$\$link; \\ unset link; \\