- don't build images in .vtmp, vcached blows this away every 15 minutes
authorMark Huang <mlhuang@cs.princeton.edu>
Fri, 2 Sep 2005 20:00:39 +0000 (20:00 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Fri, 2 Sep 2005 20:00:39 +0000 (20:00 +0000)
scripts/vuseradd

index 5fffe4d..8023aa6 100755 (executable)
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 2004  The Trustees of Princeton University (Trustees).
 #
-# $Id: vuseradd,v 1.22 2005/07/28 21:30:07 smuir Exp $
+# $Id: vuseradd,v 1.23 2005/08/21 21:41:03 mlhuang Exp $
 #
 
 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
@@ -56,11 +56,11 @@ if [ ! -d "$__DEFAULT_VSERVERDIR/$NAME" ] ; then
     done
     # build vserver
     if [ ! -d "$__DEFAULT_VSERVERDIR/$NAME" ] ; then
-       # build image in .vtmp
-       TMP=$(mktemp -d "$__DEFAULT_VSERVERDIR/.vtmp/$NAME.XXXXXX")
+       # build in temporary directory
+       TMP=$(mktemp -d "$__DEFAULT_VSERVERDIR/.$NAME.XXXXXX")
        "$__PKGLIBDIR/vbuild" "$__DEFAULT_VSERVERDIR/vserver-reference" "$TMP"
        RETVAL=$?
-       # move it to .vcache when complete
+       # move it to its permanent location when complete
        if [ $RETVAL -ne 0 ] ; then 
            echo "Error $RETVAL building $__DEFAULT_VSERVERDIR/$NAME"
            rm -rf "$TMP" $__CONFDIR/$NAME.conf $__PKGSTATEDIR/$NAME.ctx