From c22f0fcf3eb1eb76298874d6143b1acc42ee208c Mon Sep 17 00:00:00 2001
From: jcambon <jcambon@localhost>
Date: Thu, 09 Apr 2009 10:08:41 +0000
Subject: [PATCH] Fix for issue #3814 : start-ds script return before server has started
---
opends/src/server/org/opends/server/core/DirectoryServer.java | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index efa1d16..f07e184 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -227,6 +227,7 @@
import org.opends.server.util.args.ArgumentException;
import org.opends.server.util.args.ArgumentParser;
import org.opends.server.util.args.BooleanArgument;
+import org.opends.server.util.args.IntegerArgument;
import org.opends.server.util.args.StringArgument;
import org.opends.server.workflowelement.WorkflowElement;
import org.opends.server.workflowelement.WorkflowElementConfigManager;
@@ -9127,6 +9128,7 @@
// Define the arguments that may be provided to the server.
BooleanArgument checkStartability = null;
BooleanArgument quietMode = null;
+ IntegerArgument timeout = null;
BooleanArgument windowsNetStart = null;
BooleanArgument displayUsage = null;
BooleanArgument fullVersion = null;
@@ -9210,6 +9212,14 @@
argParser.addArgument(quietMode);
+ // Not used in this class, but required by the start-ds script
+ // (see issue #3814)
+ timeout = new IntegerArgument("timeout", 't', "timeout", true, false,
+ true, INFO_SECONDS_PLACEHOLDER.get(), 60,
+ null, true, 0, false,
+ 0, INFO_DSCORE_DESCRIPTION_TIMEOUT.get());
+ argParser.addArgument(timeout);
+
displayUsage = new BooleanArgument("help", 'H', "help",
INFO_DSCORE_DESCRIPTION_USAGE.get());
argParser.addArgument(displayUsage);
@@ -9303,6 +9313,12 @@
RuntimeInformation.printInfo();
return;
}
+ else if (noDetach.isPresent() && timeout.isPresent()) {
+ Message message = ERR_DSCORE_ERROR_NODETACH_TIMEOUT.get();
+ System.err.println(message);
+ System.err.println(argParser.getUsage());
+ System.exit(1);
+ }
// At this point, we know that we're going to try to start the server.
--
Gitblit v1.10.0