# No clean way to do this right now.
return None
+ def get_unshare_netns_config(self):
+ try:
+ unshare_netns = int(self.config.get('spaces/net'))
+ except:
+ unshare_netns = 0;
+ return unshare_netns;
+
def __do_chroot(self):
os.chroot(self.dir)
os.chdir("/")
print >>state_file, "%u" % self.ctx
state_file.close()
- if vserverimpl.chcontext(self.ctx, vserverimpl.text2bcaps(self.get_capabilities_config())):
+ if vserverimpl.chcontext(self.ctx, vserverimpl.text2bcaps(self.get_capabilities_config()), self.get_unshare_netns_config()):
self.set_resources()
vserverimpl.setup_done(self.ctx)