From 37b3643db122864784956d1deceea52b59e2266d Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
Date: Sat, 10 Aug 2013 12:59:48 +0200
Subject: [PATCH] wait for kill

---
 hsarback/src/de/hsadmin/mods/user/UnixUserProcessorFactory.java |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/user/UnixUserProcessorFactory.java b/hsarback/src/de/hsadmin/mods/user/UnixUserProcessorFactory.java
index e03a227..019e4d7 100644
--- a/hsarback/src/de/hsadmin/mods/user/UnixUserProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/user/UnixUserProcessorFactory.java
@@ -7,7 +7,6 @@
 import de.hsadmin.core.qserv.EntityProcessorFactory;
 import de.hsadmin.core.qserv.Processor;
 import de.hsadmin.core.qserv.ShellProcessor;
-import de.hsadmin.hostsharing.QuotaLimit;
 
 /**
  * Factory class which creates Processor instances for dealing with UNIX user
@@ -57,7 +56,7 @@
 		UnixUser user = (UnixUser) entity;
 		String uid = user.getName();
 		if (uid != null && uid.length() > 4) {
-			Processor killProcessesProc = new ShellProcessor("killall -u " + uid + " || echo -n 'no processes'");
+			Processor killProcessesProc = new ShellProcessor("killall -u " + uid + " && sleep 2 || echo -n 'no processes'");
 			Processor userdelProc = null;
 			if (user.isDefaultHomedir()) {
 				userdelProc = new ShellProcessor("userdel " + uid + " && rm -rf '" + user.getHomedir() + "'");

--
Gitblit v1.9.0-SNAPSHOT