Commit dbe4f01e authored by Kirill Smelkov's avatar Kirill Smelkov

Setup stub /etc

Else screen complains:

(neo) (z-dev) (g.env) I have no name!@deco:/# screen
getpwuid() can't identify your account!
parent 7ef9c285
......@@ -140,8 +140,10 @@ def main():
slappart = sys.argv[1]
# create directories inside container
dirv = ["/proc", "/sys", "/tmp", "/bin", "/sbin", "/lib", "/lib64",
"/usr/bin", "/usr/lib"]
dirv = ["/proc", "/sys", "/tmp",
"/bin", "/sbin", "/lib", "/lib64", "/usr/bin", "/usr/lib",
"/etc",
]
for _ in dirv:
mkdir_p(slappart + _)
......@@ -213,6 +215,9 @@ def main():
bind("/usr/bin", slappart + "/usr/bin", MS_RDONLY)
bind("/usr/lib", slappart + "/usr/lib", MS_RDONLY)
# XXX we need to setup some small /etc/{passwd,group} - else e.g. screen is not working
bind("/etc", slappart + "/etc", MS_RDONLY)
# XXX sysfs and proc are somehow special - mount succeeds only after fork
pid = os.fork()
if pid != 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment