diff --git a/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java b/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java index 911366d..8b1ec24 100644 --- a/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java +++ b/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java @@ -148,7 +148,6 @@ public class PacModuleImpl extends AbstractModuleImpl { for (UnixUser user : pac.getUnixUser()) { if (!pacName.equals(user.getName())) { helperModule.delete(user); -// pac.getUnixUser().remove(user); } } super.delete(existingEntity); diff --git a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java index 1423b48..f96a02a 100644 --- a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java @@ -68,16 +68,18 @@ public class PacProcessorFactory implements EntityProcessorFactory { public Processor createDeleteProcessor( EntityManager em, T entity) throws ProcessorException { Pac pac = (Pac) entity; + em.refresh(pac); Hive hive = pac.getHive(); UnixUser unixUser = getPacAdminUser(pac); Map hiveValues = fillHiveValues(hive); List> pacValuesList = fillPacValuesList(hive); - return new CompoundProcessor( + WaitingTasksProcessor waitingProcessor = new WaitingTasksProcessor(new CompoundProcessor( createEtcHostsProc(hiveValues, pacValuesList), createNetworkInterfacesProc(hiveValues, pacValuesList), createSudouersProc(hiveValues, pacValuesList), - createProftpdConfProc(hiveValues, pacValuesList), - createDelUserProc(unixUser.getName())); + createProftpdConfProc(hiveValues, pacValuesList))); + waitingProcessor.appendProcessor(pac.getHiveName(), createDelUserProc(unixUser.getName()), "remove packet"); + return waitingProcessor; } private TemplateProcessor createEtcHostsProc(