r3643 - jhalfs/trunk/LFS

pierre at linuxfromscratch.org pierre at linuxfromscratch.org
Sun Dec 30 08:30:49 PST 2012


Author: pierre
Date: 2012-12-30 09:30:44 -0700 (Sun, 30 Dec 2012)
New Revision: 3643

Modified:
   jhalfs/trunk/LFS/master.sh
Log:
Cleanly umount the kernel files, following the new way of mounting /dev/shm

Modified: jhalfs/trunk/LFS/master.sh
===================================================================
--- jhalfs/trunk/LFS/master.sh	2012-12-30 16:26:22 UTC (rev 3642)
+++ jhalfs/trunk/LFS/master.sh	2012-12-30 16:30:44 UTC (rev 3643)
@@ -512,15 +512,28 @@
 devices: ck_LFS ck_UID
 	sudo mount -v --bind /dev \$(LFS)/dev
 	sudo mount -vt devpts devpts \$(LFS)/dev/pts
-	sudo mount -vt tmpfs shm \$(LFS)/dev/shm
 	sudo mount -vt proc proc \$(LFS)/proc
 	sudo mount -vt sysfs sysfs \$(LFS)/sys
+	if [ -h \$(LFS)/dev/shm ]; then \\
+	  link=\$\$(readlink \$(LFS)/dev/shm); \\
+	  sudo mkdir -p \$(LFS)/\$\$link; \\
+	  sudo mount -vt tmpfs shm \$(LFS)/\$\$link; \\
+	  unset link; \\
+	else \\
+	  sudo mount -vt tmpfs shm \$(LFS)/dev/shm; \\
+	fi
 
 teardown: ck_LFS
 	sudo umount -v \$(LFS)/sys
 	sudo umount -v \$(LFS)/proc
-	sudo umount -v \$(LFS)/dev/shm
 	sudo umount -v \$(LFS)/dev/pts
+	if [ -h \$(LFS)/dev/shm ]; then \\
+	  link=\$\$(readlink \$(LFS)/dev/shm); \\
+	  sudo umount -v \$(LFS)/\$\$link; \\
+	  unset link; \\
+	else \\
+	  sudo umount -v \$(LFS)/dev/shm; \\
+	fi
 	sudo umount -v \$(LFS)/dev
 
 chroot: devices
@@ -561,7 +574,13 @@
 do_housekeeping:
 	@-umount \$(MOUNT_PT)/sys
 	@-umount \$(MOUNT_PT)/proc
-	@-umount \$(MOUNT_PT)/dev/shm
+	@-if [ -h \$(MOUNT_PT)/dev/shm ]; then \\
+	  link=\$\$(readlink \$(MOUNT_PT)/dev/shm); \\
+	  umount \$(MOUNT_PT)/\$\$link; \\
+	  unset link; \\
+	else \\
+	  umount \$(MOUNT_PT)/dev/shm; \\
+	fi
 	@-umount \$(MOUNT_PT)/dev/pts
 	@-umount \$(MOUNT_PT)/dev
 	@-rm /tools




More information about the alfs-log mailing list