jbossas/jboss-as — pull request #2985 by mstruk (2012-08-29 16:36:49+00:00)
Title: Startup scripts ergonomics

I propose slight modifications of startup scripts:

- Export JBOSS_HOME before including standalone.conf

This makes it possible to refer to $JBOSS_HOME within standalone.conf which is much better than referring to $PWD, as that requires always changing to correct directory before running a startup script.
For example: standalone.conf may refer to $PWD/extras presuming PWD is JBOSS_HOME. Or standalone.conf may refer to $PWD/../extras presuming PWD is JBOSS_HOME/bin.

- If a warning situation occurs, warning message should be more prominent

When JBOSS_HOME env variable is not equal to JBOSS_HOME corresponding to the location of the script (./.. since script is in $JBOSS_HOME/bin) there is a warning displayed as almost always such a situation is a usage error.

Currently this warning is so incospicuous that it's never noticed. With this patch I make it much more prominent, and it also pauses execution for 2 seconds.