yoavs 2004/11/17 12:17:47
Modified: catalina/src/bin catalina.sh setclasspath.sh startup.sh
webapps/docs changelog.xml
Log:
Bugzilla 31132: better -x/-r handling for OS/400 in startup scripts
Revision Changes Path
1.17 +15 -6 jakarta-tomcat-catalina/catalina/src/bin/catalina.sh
Index: catalina.sh
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/catalina.sh,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- catalina.sh 28 Jul 2004 15:49:19 -0000 1.16
+++ catalina.sh 17 Nov 2004 20:17:46 -0000 1.17
@@ -91,13 +91,22 @@
fi
# Get standard Java environment variables
-if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
+if $os400; then
+ # -r will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
BASEDIR="$CATALINA_HOME"
- . "$CATALINA_HOME"/bin/setclasspath.sh
+ . "$CATALINA_HOME"/bin/setclasspath.sh
else
- echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
- echo "This file is needed to run this program"
- exit 1
+ if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
+ BASEDIR="$CATALINA_HOME"
+ . "$CATALINA_HOME"/bin/setclasspath.sh
+ else
+ echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
fi
# Add on extra jar files to CLASSPATH
1.10 +12 -4 jakarta-tomcat-catalina/catalina/src/bin/setclasspath.sh
Index: setclasspath.sh
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/setclasspath.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- setclasspath.sh 14 Oct 2004 17:32:04 -0000 1.9
+++ setclasspath.sh 17 Nov 2004 20:17:46 -0000 1.10
@@ -31,9 +31,17 @@
exit 1
fi
if [ ! -x "$BASEDIR"/bin/setclasspath.sh ]; then
- echo "The BASEDIR environment variable is not defined correctly"
- echo "This environment variable is needed to run this program"
- exit 1
+ if $os400; then
+ # -x will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ eval
+ else
+ echo "The BASEDIR environment variable is not defined correctly"
+ echo "This environment variable is needed to run this program"
+ exit 1
+ fi
fi
# Set the default -Djava.endorsed.dirs argument
1.4 +21 -6 jakarta-tomcat-catalina/catalina/src/bin/startup.sh
Index: startup.sh
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/startup.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- startup.sh 4 Aug 2002 18:19:43 -0000 1.3
+++ startup.sh 17 Nov 2004 20:17:46 -0000 1.4
@@ -5,6 +5,13 @@
# $Id$
#
-----------------------------------------------------------------------------
+# Better OS/400 detection: see Bugzilla 31132
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+esac
+
# resolve links - $0 may be a softlink
PRG="$0"
@@ -22,10 +29,18 @@
EXECUTABLE=catalina.sh
# Check that target executable exists
-if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
- echo "Cannot find $PRGDIR/$EXECUTABLE"
- echo "This file is needed to run this program"
- exit 1
-fi
+if $os400; then
+ # -x will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ eval
+else
+ if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+ echo "Cannot find $PRGDIR/$EXECUTABLE"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
1.169 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml
Index: changelog.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -r1.168 -r1.169
--- changelog.xml 17 Nov 2004 19:47:43 -0000 1.168
+++ changelog.xml 17 Nov 2004 20:17:46 -0000 1.169
@@ -32,6 +32,9 @@
<update>
<bug>32235</bug>: Sync conf/web.xml MIME types with Apache httpd.
(yoavs)
</update>
+ <fix>
+ <bug>31132</bug>: Better -x/-r support for OS/400 in startup
scripts. (yoavs)
+ </fix>
</changelog>
</subsection>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]