Skip to content

Commit

Permalink
fix path issues in jdr.sh
Browse files Browse the repository at this point in the history
fix argument order issues in jdr.sh
a null controllerClient is a valid scenario, so handling that properly
global option handling in jdr/sosreport was inverted
  • Loading branch information
jhjaggars authored and bstansberry committed Feb 13, 2012
1 parent 3866f82 commit 043f53c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions build/src/main/resources/bin/jdr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
JBOSS_HOME=$RESOLVED_JBOSS_HOME
else
SANITIZED_JBOSS_HOME=`cd "$JBOSS_HOME/.."; pwd`
if [ "$RESOLVED_JBOSS" != "$SANITIZED_JBOSS_HOME" ]; then
SANITIZED_JBOSS_HOME=`cd "$JBOSS_HOME"; pwd`
if [ "$RESOLVED_JBOSS_HOME" != "$SANITIZED_JBOSS_HOME" ]; then
echo "WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur."
echo ""
fi
Expand Down Expand Up @@ -63,8 +63,8 @@ if $cygwin; then
fi

eval \"$JAVA\" $JAVA_OPTS \
-Djboss.home.dir=\"$JBOSS_HOME\" \
-jar \"$JBOSS_HOME/jboss-modules.jar\" \
-mp \"${JBOSS_MODULEPATH}\" \
org.jboss.as.jdr \
-Djboss.home.dir=\"$JBOSS_HOME\" \
"$@"
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static void main(String[] args) {
String host = "localhost";

try {
CommandLine line = parser.parse(options, args, true);
CommandLine line = parser.parse(options, args, false);

if (line.hasOption("help")) {
formatter.printHelp(usage, options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public JdrReport collect(String username, String password, String host, String p
reporter.setPassword(password);
reporter.setHostname(host);
reporter.setPort(port);
reporter.setControllerClient(controllerClient);
if (controllerClient != null) {
reporter.setControllerClient(controllerClient);
}
reporter.setHostControllerName(hostControllerName);
reporter.setServerName(serverName);
reporter.setHome(homeDir);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def getOption(self, optionname, default=0):
any of the option names is returned."""

def _check(key):
if hasattr(key, "__iter__"):
if hasattr(optionname, "__iter__"):
return key in optionname
else:
return key == optionname
Expand Down

0 comments on commit 043f53c

Please sign in to comment.