__do_chroot is also called from chrootcall, which doesn't need to cache it.
authorDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 11 Dec 2007 18:44:37 +0000 (18:44 +0000)
committerDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 11 Dec 2007 18:44:37 +0000 (18:44 +0000)
python/vserver.py

index 24b4560..c201bc7 100644 (file)
@@ -245,7 +245,6 @@ class VServer:
         return None
 
     def __do_chroot(self):
-        self.config.cache_it()
         os.chroot(self.dir)
         os.chdir("/")
 
@@ -412,6 +411,7 @@ class VServer:
             raise ex
 
     def enter(self):
+        self.config.cache_it()
         self.__do_chroot()
         self.__do_chcontext(None)
 
@@ -434,6 +434,7 @@ class VServer:
                 if fd != 0:
                     os.dup2(fd, 0)
                     os.close(fd)
+                self.config.cache_it()
                 self.__do_chroot()
                 log = open("/var/log/boot.log", "w", 0)
                 if log.fileno() != 1: