summaryrefslogtreecommitdiff
blob: dee3183a12aacce4ce52c57f97ce5458d9d911a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
https://bugs.gentoo.org/show_bug.cgi?id=363577

diff --git a/catalyst-2.0.18/modules/generic_stage_target.py b/catalyst-2.0.18/modules/generic_stage_target.py
index cc24c63..75101e7 100644
--- a/catalyst-2.0.18/modules/generic_stage_target.py
+++ b/catalyst-2.0.18/modules/generic_stage_target.py
@@ -911,25 +911,26 @@ class generic_stage_target(generic_target):
 			src=self.mountmap[x]
 			if "SNAPCACHE" in self.settings and x == "/usr/portage":
 				self.snapshot_lock_object.read_lock()
-			if os.uname()[0] == "FreeBSD":
-				if src == "/dev":
-					retval=os.system("mount -t devfs none "+\
-						self.settings["chroot_path"]+x)
-				else:
-					retval=os.system("mount_nullfs "+src+" "+\
+			if src == "tmpfs":
+				if "var_tmpfs_portage" in self.settings:
+					retval=os.system("mount -t tmpfs -o size="+\
+						self.settings["var_tmpfs_portage"]+"G "+src+" "+\
 						self.settings["chroot_path"]+x)
 			else:
-				if src == "tmpfs":
-					if "var_tmpfs_portage" in self.settings:
-						retval=os.system("mount -t tmpfs -o size="+\
-							self.settings["var_tmpfs_portage"]+"G "+src+" "+\
+				if os.uname()[0] == "FreeBSD":
+					if src == "/dev":
+						retval=os.system("mount -t devfs none "+\
+							self.settings["chroot_path"]+x)
+					else:
+						retval=os.system("mount_nullfs "+src+" "+\
 							self.settings["chroot_path"]+x)
-				elif src == "shmfs":
-					retval=os.system("mount -t tmpfs -o noexec,nosuid,nodev shm "+\
-						self.settings["chroot_path"]+x)
 				else:
-					retval=os.system("mount --bind "+src+" "+\
-						self.settings["chroot_path"]+x)
+					if src == "shmfs":
+						retval=os.system("mount -t tmpfs -o noexec,nosuid,nodev shm "+\
+							self.settings["chroot_path"]+x)
+					else:
+						retval=os.system("mount --bind "+src+" "+\
+							self.settings["chroot_path"]+x)
 			if retval!=0:
 				self.unbind()
 				raise CatalystError,"Couldn't bind mount "+src