to avoid people logging in while deleting their slice.
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Thu, 24 Jan 2008 19:32:59 +0000 (19:32 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Thu, 24 Jan 2008 19:32:59 +0000 (19:32 +0000)
scripts/vuserdel

index c0a4cee..2bfea17 100755 (executable)
@@ -27,6 +27,9 @@ NAME=$1
 # read config file to get context ID
 CTX=`cat $__CONFDIR/$NAME/context`
 
+# delete user
+[ -z "$STATIC" ] && userdel -r $NAME
+
 # don't bother stopping gracefully, just kill all the processes
 $_VKILL -c "$CTX" -s 15 -1
 sleep 2
@@ -44,9 +47,6 @@ do
         umount -l "$dir"
 done
 
-# delete user
-[ -z "$STATIC" ] && userdel -r $NAME
-
 # remove vserver configuration directory
 rm -rf /etc/vservers/$NAME