Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315687

Summary: included init script broken
Product: [RT] Jetty Reporter: Brad Larson <bklarson>
Component: serverAssignee: Joakim Erdfelt <joakim.erdfelt>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: jetty-inbox, mgorovoy
Version: 7.1.3   
Target Milestone: 7.1.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Brad Larson CLA 2010-06-03 17:57:38 EDT
The default bin/jetty.sh script couldn't find my $JETTY_HOME, even though it was on the list of directories to search.  The problem was with the following block:


212   for L in "${STANDARD_LOCATIONS[@]}"
213   do
214     for N in "${JETTY_DIR_NAMES[@]}"
215     do
216       JETTY_HOME=("$L/"$N)
217       if [ ! -d "$JETTY_HOME" ] || [ ! -f "$JETTY_HOME/$JETTY_INSTALL_TRACE_    FILE" ]
218       then
219         JETTY_HOME=
220       fi
221     done
222     
223     [ "$JETTY_HOME" ] && break
224   done
225 fi

If you look closely, we don't check if JETTY_HOME is set inside the inner loop, just the outer loop.  So this check only works if JETTY_HOME is at the last value of N.  To fix this, I copied line 223 to just below line 220.  Please let me know if more details are needed.
Comment 1 Joakim Erdfelt CLA 2010-06-07 18:18:22 EDT
Thank you.
Bug has been fixed in revision 1937 (trunk)