Fix configuration conversion
authorDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 24 Jul 2007 17:22:37 +0000 (17:22 +0000)
committerDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 24 Jul 2007 17:22:37 +0000 (17:22 +0000)
python/vserver.py
scripts/vuseradd

index cfd133d..e923309 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 2005 Princeton University
 
-#$Id: vserver.py,v 1.61 2007/07/18 14:50:49 dhozac Exp $
+#$Id: vserver.py,v 1.62 2007/07/20 19:45:35 dhozac Exp $
 
 import errno
 import fcntl
@@ -324,8 +324,9 @@ class VServer:
                          ([], filter_fn))[0]
         garbage += filter(os.path.isfile, map((LOCKDIR + "/").__add__,
                                               os.listdir(LOCKDIR)))
-        for f in garbage:
-            os.unlink(f)
+        if False:
+            for f in garbage:
+                os.unlink(f)
 
         # set the initial runlevel
         f = open(RUNDIR + "/utmp", "w")
index 90adf26..aa1210b 100755 (executable)
@@ -5,7 +5,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2004-2006 The Trustees of Princeton University
 #
-# $Id: vuseradd,v 1.31 2007/07/05 17:36:42 dhozac Exp $
+# $Id: vuseradd,v 1.28 2007/07/05 19:05:14 dhozac Exp $
 #
 
 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
@@ -113,7 +113,8 @@ if [ ! -d $__CONFDIR/$NAME ] ; then
     rm -rf $__DEFAULT_VSERVERDIR/$NAME
     # Move the guest back
     if [ "$HAS_VSERVERDIR" = 1 ] ; then
-       mv "$TMP" $__DEFAULT_VSERVERDIR/$NAME
+       mv "$TMP/$NAME" $__DEFAULT_VSERVERDIR/$NAME
+       rm -rf "$TMP"
     fi
 fi