| | |
| | | import org.opends.messages.Message; |
| | | |
| | | import static org.opends.server.util.StaticUtils.wrapText; |
| | | |
| | | import org.opends.server.util.BuildVersion; |
| | | import org.opends.server.util.args.ArgumentException; |
| | | import org.opends.server.util.args.BooleanArgument; |
| | | import org.opends.server.util.args.LDAPConnectionArgumentParser; |
| | |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | // If we should just display usage or version information, |
| | | // then print it and exit. |
| | | if (argParser.usageOrVersionDisplayed()) |
| | |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // If no arguments were provided, then display usage information and exit. |
| | | int numArgs = args.length; |
| | | if (numArgs == 0) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | if (indexList.getValues().size() <= 0 && !rebuildAll.isPresent() |
| | | && !rebuildDegraded.isPresent()) |
| | | { |
| | |
| | | return 1; |
| | | } |
| | | |
| | | // Checks the version - if upgrade required, the tool is unusable |
| | | try |
| | | { |
| | | BuildVersion.checkVersionMismatch(); |
| | | } |
| | | catch (InitializationException e) |
| | | { |
| | | err.println(wrapText(e.getMessage(), MAX_LINE_WIDTH)); |
| | | return 1; |
| | | } |
| | | |
| | | return process(argParser, initializeServer, out, err); |
| | | } |
| | | |