r3645 - jhalfs/branches/ablfs/LFS

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


Author: pierre
Date: 2012-12-30 09:56:46 -0700 (Sun, 30 Dec 2012)
New Revision: 3645

Modified:
   jhalfs/branches/ablfs/LFS/master.sh
Log:
merge rev 3643 into ablfs

Modified: jhalfs/branches/ablfs/LFS/master.sh
===================================================================
--- jhalfs/branches/ablfs/LFS/master.sh	2012-12-30 16:54:18 UTC (rev 3644)
+++ jhalfs/branches/ablfs/LFS/master.sh	2012-12-30 16:56:46 UTC (rev 3645)
@@ -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