mount --bind

Archaic archaic at linuxfromscratch.org
Tue Jun 1 15:20:57 PDT 2004


Don't know if this is done in any of the other LFS profiles, but I added
in the missing umount that creatingtoolsdir.xml references. Also added
umounting of devpts and proc.

Also, I modified the addinguser.xml to replace the recursive chown of
/tools to chowning /tools and &build_dir explicitly. The reasoning for
not chowning &package_dir are:

1) if &packages_dir is bind mounted, you will be modifying files outside
   of the lfs partition.
2) if &packages_dir is bind mounted from a CD, the build dies.
3) since umask is 022 (per the runit script) it won't matter who owns
   the files since the lfs user will only ever need read access.

Attached is the patch

HTH someone.

-- 
Archaic

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it."

- Brian Kernighan

-------------- next part --------------
diff -Naur nALFS-1.2.2.old/profile/LFS-5.0-3/LFS-5.0.xml nALFS-1.2.2/profile/LFS-5.0-3/LFS-5.0.xml
--- nALFS-1.2.2.old/profile/LFS-5.0-3/LFS-5.0.xml	2004-03-02 16:30:07.000000000 -0500
+++ nALFS-1.2.2/profile/LFS-5.0-3/LFS-5.0.xml	2004-06-01 13:58:59.000000000 -0500
@@ -235,6 +235,17 @@
 		<file>/etc/lfs-release</file>
 		<content>=&LFS-version;</content>
 	</textdump>
+
+	<stage name="Umounting proc & devpts">
+		<execute command="umount">
+		<param>/dev/pts</param>
+		<param>/proc</param>
+
+	<!-- If you used a bind mount for your package dir, unmount it here. -->
+	<!-- 	<param>&LFS;&packages_dir;</param> -->
+
+	        </execute>
+	</stage>
 </stage>
 
 <remove>/tools</remove>
diff -Naur nALFS-1.2.2.old/profile/LFS-5.0-3/chapter05/addinguser.xml nALFS-1.2.2/profile/LFS-5.0-3/chapter05/addinguser.xml
--- nALFS-1.2.2.old/profile/LFS-5.0-3/chapter05/addinguser.xml	2003-12-05 22:25:45.000000000 -0500
+++ nALFS-1.2.2/profile/LFS-5.0-3/chapter05/addinguser.xml	2004-06-01 13:56:55.000000000 -0500
@@ -4,7 +4,7 @@
 	<execute command="echo &lfs-user;:&lfs-password; | chpasswd" />
 
 	<ownership user="&lfs-user;">
-		<option>recursive</option>
 		<name>&LFS;/tools</name>
+		<name>&LFS;&build_dir;</name>
 	</ownership>
 </stage>


More information about the alfs-discuss mailing list