r3779 - jhalfs/trunk/LFS

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Thu Jan 23 01:15:05 PST 2014


Author: pierre
Date: Thu Jan 23 01:15:05 2014
New Revision: 3779

Log:
Adapt the umounting of kernel virtual filesystems to new instructions
in the LFS book

Modified:
   jhalfs/trunk/LFS/master.sh

Modified: jhalfs/trunk/LFS/master.sh
==============================================================================
--- jhalfs/trunk/LFS/master.sh	Thu Jan 23 00:59:08 2014	(r3778)
+++ jhalfs/trunk/LFS/master.sh	Thu Jan 23 01:15:05 2014	(r3779)
@@ -520,20 +520,18 @@
 	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 @@
 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; \\



More information about the alfs-log mailing list