From 9dc10dec2d5d7f61116f7f647b7cf9596ca77be0 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 05 Jun 2009 09:04:50 +0000
Subject: [PATCH] svn merge -r5333:5417 https://opends.dev.java.net/svn/opends/branches/b2.0
---
opendj-sdk/opends/src/server/org/opends/server/tools/configurator/CheckInstance.java | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/configurator/CheckInstance.java b/opendj-sdk/opends/src/server/org/opends/server/tools/configurator/CheckInstance.java
index 06eb2db..b54ab67 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/configurator/CheckInstance.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/configurator/CheckInstance.java
@@ -86,6 +86,7 @@
private static BooleanArgument checkVersionArg;
private static String currentUser;
private static String instanceOwner;
+ private static boolean isWin;
private static int SUCCESS = 0;
private static int ARGS_ERROR = 1;
private static int USER_ERROR = 2;
@@ -173,10 +174,12 @@
.get(ERR_INSTANCE_ROOT_NOT_SPECIFIED.get()));
System.exit(ReturnCode.APPLICATION_ERROR.getReturnCode());
}
+ isWin = System.getProperty("file.separator").equals("\\");
// Initialize all the command-line argument types and register them with the
// parser.
try {
+ if (!isWin) {
currentUserArg = new StringArgument(CURRENT_USER_OPTION_LONG,
CURRENT_USER_OPTION_SHORT,
CURRENT_USER_OPTION_LONG,
@@ -184,6 +187,7 @@
INFO_CURRENT_USER_PLACEHOLDER.get(),
INFO_CHECK_DESCRIPTION_CURRENT_USER.get());
argParser.addArgument(currentUserArg);
+ }
checkVersionArg = new BooleanArgument(CHECK_VERSION_OPTION_LONG,
CHECK_VERSION_OPTION_SHORT,
CHECK_VERSION_OPTION_LONG,
@@ -203,9 +207,11 @@
System.exit(ARGS_ERROR);
}
+ File confDir = new File(instanceRootFromSystem,
+ Installation.CONFIG_PATH_RELATIVE);
+
+ if (!isWin) {
// Check user
- File confDir = new File (instanceRootFromSystem,
- Installation.CONFIG_PATH_RELATIVE);
File conf = new File (confDir, Installation.CURRENT_CONFIG_FILE_NAME);
String cmd = null;
Process proc = null;
@@ -276,6 +282,7 @@
System.err.println(ERR_CHECK_USER_ERROR.get(instanceOwner));
System.exit(USER_ERROR);
}
+ }
// Initialize buildinfo in not already done (ZIP delivery)
BuildInformation installBi =
--
Gitblit v1.10.0