| Summary: | jetty.sh fails to find JETTY_HOME in standard directories | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Barry Pearce <netsupport> |
| Component: | other | Assignee: | Joakim Erdfelt <joakim.erdfelt> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | gregw, joakim.erdfelt, mgorovoy |
| Version: | 7.1.4 | ||
| Target Milestone: | 7.1.x | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Barry Pearce
Just installed Jetty on Ubuntu Lucid in /usr/local/jetty and was able to start it successfully with both jetty-distribution-7.1.4.v20100610 and jetty-hightide-7.1.4.v20100610 No JETTY_HOME error for me. Can you provide more details? This is on an ubuntu karmic koala install.
Here is the code in error:
for L in "${STANDARD_LOCATIONS[@]}"
do
for N in "${JETTY_DIR_NAMES[@]}"
do
JETTY_HOME=("$L/"$N)
if [ ! -d "$JETTY_HOME" ] || [ ! -f "$JETTY_HOME/$JETTY_INSTALL_TRACE_FILE" ]
then
JETTY_HOME=
fi
[ "$JETTY_HOME" ] && break
done
done
The break will only break 1 loop not 2. The fix is either to use 'break 2' or insert a duplicate test/break line between the two done lines.
Hope this helps.
I hasten to add that if jetty is installed to the last standard location or JETTY_HOME is set in the calling environment (unlikely if called using the service command) or JETTY_HOME is specified in /etc/default/jetty* then the script will not show an error and will work as expected. Fix committed to trunk r2018 The JETTY_HOME lookup loops have been reworked to be more clear and more resilient (with documentation). |