to avoid people logging in while deleting their slice.
[util-vserver-pl.git] / 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