setrunlevel takes a filename and a runlevel.
authorDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 11 Dec 2007 18:45:22 +0000 (18:45 +0000)
committerDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 11 Dec 2007 18:45:22 +0000 (18:45 +0000)
python/vserver.py

index c201bc7..590ec1b 100644 (file)
@@ -391,9 +391,7 @@ class VServer:
                 os.unlink(f)
 
         # set the initial runlevel
                 os.unlink(f)
 
         # set the initial runlevel
-        f = open(RUNDIR + "/utmp", "w")
-        vserverimpl.setrunlevel(f, runlevel)
-        f.close()
+        vserverimpl.setrunlevel(RUNDIR + "/utmp", runlevel)
 
         # mount /proc and /dev/pts
         self.__do_mount("none", self.dir, "/proc", "proc")
 
         # mount /proc and /dev/pts
         self.__do_mount("none", self.dir, "/proc", "proc")