PL3118 and PL3131 fix: do not reset the immutable bits on vservers
authorMark Huang <mlhuang@cs.princeton.edu>
Tue, 23 Nov 2004 14:47:35 +0000 (14:47 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Tue, 23 Nov 2004 14:47:35 +0000 (14:47 +0000)
scheduled for deletion. Rely on vbuild to set the immulink bit correctly
on cloned vservers. rm -rf should not fail if the bit is set correctly.

scripts/vcached
scripts/vuseradd
scripts/vuserdel

index 27d8a9b..bed2211 100755 (executable)
@@ -17,7 +17,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (c) 2004  The Trustees of Princeton University (Trustees).
 #
-# $Id: vcached,v 1.7 2004/11/17 20:34:25 mef Exp $
+# $Id: vcached,v 1.8 2004/11/19 20:27:24 mlhuang Exp $
 #
 
 # get configuration
@@ -58,7 +58,6 @@ test -e "$UTIL_VSERVER_VARS" || {
 . "$UTIL_VSERVER_VARS"
 
 # take out the trash
-chattr -R -i "$VROOTDIR/.vtmp"
 rm -rf "$VROOTDIR/.vtmp"
 
 mkdir -p "$VROOTDIR/.vcache"
@@ -87,7 +86,6 @@ while : ; do
                echo "$(date) v$i ready"
            else
                echo "$(date) Error $RETVAL building v$i"
-               chattr -R -i "$TMP"
                rm -rf "$TMP"
            fi
        fi
index 9c9457e..cc8d414 100755 (executable)
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 2004  The Trustees of Princeton University (Trustees).
 #
-# $Id: vuseradd,v 1.18 2004/11/17 20:34:25 mef Exp $
+# $Id: vuseradd,v 1.19 2004/11/17 20:37:32 mlhuang Exp $
 #
 
 : ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars}
@@ -56,7 +56,6 @@ if [ ! -d "$VROOTDIR/$NAME" ] ; then
        # move it to .vcache when complete
        if [ $RETVAL -ne 0 ] ; then 
            echo "Error $RETVAL building $VROOTDIR/$NAME"
-           chattr -R -i "$TMP"
            rm -rf "$TMP" /etc/vservers/$NAME.conf /var/run/vservers/$NAME.ctx
            userdel -r $NAME
            exit $RETVAL
index d24c479..54206f5 100755 (executable)
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 2004  The Trustees of Princeton University (Trustees).
 #
-# $Id: vuserdel,v 1.4 2004/10/20 21:45:43 mef Exp $
+# $Id: vuserdel,v 1.5 2004/10/26 03:11:23 mlhuang Exp $
 #
 
 : ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars}
@@ -42,6 +42,5 @@ rm -f /var/run/vservers/$NAME.ctx
 if [ -d $VROOTDIR/$NAME ] ; then
     TMP=$(mktemp -d "$VROOTDIR/.vtmp/$NAME.XXXXXX")
     mv "$VROOTDIR/$NAME" "$TMP"
-    chattr -R -i "$TMP"
     rm -rf "$TMP"
 fi