Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315687 - included init script broken
Summary: included init script broken
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.1.3   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 7.1.0   Edit
Assignee: Joakim Erdfelt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-03 17:57 EDT by Brad Larson CLA
Modified: 2010-06-07 18:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)