"port_tmpdir": "/var/tmp/portage",
"port_logdir": "/var/log/portage",
"proc": "/proc",
+ "shm": "/dev/shm",
}
SOURCE_MOUNTS_DEFAULTS = {
"portdir": "/usr/portage",
"port_tmpdir": "tmpfs",
"proc": "/proc",
+ "shm": "shmfs",
}
#self.mountmap["portdir"] = None
if os.uname()[0] == "Linux":
self.mounts.append("devpts")
+ self.mounts.append("shm")
self.set_mounts()
os.makedirs(target, 0755)
if not os.path.exists(self.mountmap[x]):
- if not self.mountmap[x] == "tmpfs":
+ if self.mountmap[x] not in ["tmpfs", "shmfs"]:
os.makedirs(self.mountmap[x], 0755)
src=self.mountmap[x]
self.settings["var_tmpfs_portage"] + "G " + \
src + " " + target
retval=os.system(cmd)
+ elif src == "shmfs":
+ cmd = "mount -t tmpfs -o noexec,nosuid,nodev shm " + target
+ retval=os.system(cmd)
else:
cmd = "mount --bind " + src + " " + target
#print "bind(); cmd =", cmd