As we had no /etc/passwd in the last time, we needed to create
some users like root and nobody in the build chroot.
Now, there is the "setup" package which covers this.
f.close()
self._prepare_dev()
- self._prepare_users()
self._prepare_dns()
def _prepare_dev(self):
os.umask(prevMask)
- def _prepare_users(self):
- f = open(self.chrootPath("etc", "passwd"), "w")
- f.write("root:x:0:0:root:/root:/bin/bash\n")
- f.write("nobody:x:99:99:Nobody:/:/sbin/nologin\n")
- f.close()
-
- f = open(self.chrootPath("etc", "group"), "w")
- f.write("root:x:0:root\n")
- f.write("nobody:x:99:\n")
- f.close()
-
def _prepare_dns(self):
"""
Add DNS resolution facility to chroot environment by copying